mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-295507d9a692440f/out/
matrixpilot.rs

1#![doc = "MAVLink matrixpilot dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
10#[allow(unused_imports)]
11use num_derive::FromPrimitive;
12#[allow(unused_imports)]
13use num_derive::ToPrimitive;
14#[allow(unused_imports)]
15use num_traits::FromPrimitive;
16#[allow(unused_imports)]
17use num_traits::ToPrimitive;
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
21#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
22#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23#[cfg_attr(feature = "serde", serde(tag = "type"))]
24#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25#[repr(u32)]
26#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
27pub enum ActuatorConfiguration {
28    #[doc = "Do nothing."]
29    ACTUATOR_CONFIGURATION_NONE = 0,
30    #[doc = "Command the actuator to beep now."]
31    ACTUATOR_CONFIGURATION_BEEP = 1,
32    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
33    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
34    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
35    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
36    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
37    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
38    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
39    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
40}
41impl ActuatorConfiguration {
42    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
43}
44impl Default for ActuatorConfiguration {
45    fn default() -> Self {
46        Self::DEFAULT
47    }
48}
49#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
50#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
51#[cfg_attr(feature = "serde", serde(tag = "type"))]
52#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
53#[repr(u32)]
54#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
55pub enum ActuatorOutputFunction {
56    #[doc = "No function (disabled)."]
57    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
58    #[doc = "Motor 1"]
59    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
60    #[doc = "Motor 2"]
61    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
62    #[doc = "Motor 3"]
63    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
64    #[doc = "Motor 4"]
65    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
66    #[doc = "Motor 5"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
68    #[doc = "Motor 6"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
70    #[doc = "Motor 7"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
72    #[doc = "Motor 8"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
74    #[doc = "Motor 9"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
76    #[doc = "Motor 10"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
78    #[doc = "Motor 11"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
80    #[doc = "Motor 12"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
82    #[doc = "Motor 13"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
84    #[doc = "Motor 14"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
86    #[doc = "Motor 15"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
88    #[doc = "Motor 16"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
90    #[doc = "Servo 1"]
91    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
92    #[doc = "Servo 2"]
93    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
94    #[doc = "Servo 3"]
95    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
96    #[doc = "Servo 4"]
97    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
98    #[doc = "Servo 5"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
100    #[doc = "Servo 6"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
102    #[doc = "Servo 7"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
104    #[doc = "Servo 8"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
106    #[doc = "Servo 9"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
108    #[doc = "Servo 10"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
110    #[doc = "Servo 11"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
112    #[doc = "Servo 12"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
114    #[doc = "Servo 13"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
116    #[doc = "Servo 14"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
118    #[doc = "Servo 15"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
120    #[doc = "Servo 16"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
122}
123impl ActuatorOutputFunction {
124    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
125}
126impl Default for ActuatorOutputFunction {
127    fn default() -> Self {
128        Self::DEFAULT
129    }
130}
131#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
133#[cfg_attr(feature = "serde", serde(tag = "type"))]
134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
135#[repr(u32)]
136#[doc = "Enumeration of the ADSB altimeter types"]
137pub enum AdsbAltitudeType {
138    #[doc = "Altitude reported from a Baro source using QNH reference"]
139    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
140    #[doc = "Altitude reported from a GNSS source"]
141    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
142}
143impl AdsbAltitudeType {
144    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
145}
146impl Default for AdsbAltitudeType {
147    fn default() -> Self {
148        Self::DEFAULT
149    }
150}
151#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
153#[cfg_attr(feature = "serde", serde(tag = "type"))]
154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
155#[repr(u32)]
156#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
157pub enum AdsbEmitterType {
158    ADSB_EMITTER_TYPE_NO_INFO = 0,
159    ADSB_EMITTER_TYPE_LIGHT = 1,
160    ADSB_EMITTER_TYPE_SMALL = 2,
161    ADSB_EMITTER_TYPE_LARGE = 3,
162    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
163    ADSB_EMITTER_TYPE_HEAVY = 5,
164    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
165    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
166    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
167    ADSB_EMITTER_TYPE_GLIDER = 9,
168    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
169    ADSB_EMITTER_TYPE_PARACHUTE = 11,
170    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
171    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
172    ADSB_EMITTER_TYPE_UAV = 14,
173    ADSB_EMITTER_TYPE_SPACE = 15,
174    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
175    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
176    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
177    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
178}
179impl AdsbEmitterType {
180    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
181}
182impl Default for AdsbEmitterType {
183    fn default() -> Self {
184        Self::DEFAULT
185    }
186}
187bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
188impl AdsbFlags {
189    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
190}
191impl Default for AdsbFlags {
192    fn default() -> Self {
193        Self::DEFAULT
194    }
195}
196bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
197impl AisFlags {
198    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
199}
200impl Default for AisFlags {
201    fn default() -> Self {
202        Self::DEFAULT
203    }
204}
205#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
207#[cfg_attr(feature = "serde", serde(tag = "type"))]
208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
209#[repr(u32)]
210#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
211pub enum AisNavStatus {
212    #[doc = "Under way using engine."]
213    UNDER_WAY = 0,
214    AIS_NAV_ANCHORED = 1,
215    AIS_NAV_UN_COMMANDED = 2,
216    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
217    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
218    AIS_NAV_MOORED = 5,
219    AIS_NAV_AGROUND = 6,
220    AIS_NAV_FISHING = 7,
221    AIS_NAV_SAILING = 8,
222    AIS_NAV_RESERVED_HSC = 9,
223    AIS_NAV_RESERVED_WIG = 10,
224    AIS_NAV_RESERVED_1 = 11,
225    AIS_NAV_RESERVED_2 = 12,
226    AIS_NAV_RESERVED_3 = 13,
227    #[doc = "Search And Rescue Transponder."]
228    AIS_NAV_AIS_SART = 14,
229    #[doc = "Not available (default)."]
230    AIS_NAV_UNKNOWN = 15,
231}
232impl AisNavStatus {
233    pub const DEFAULT: Self = Self::UNDER_WAY;
234}
235impl Default for AisNavStatus {
236    fn default() -> Self {
237        Self::DEFAULT
238    }
239}
240#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
242#[cfg_attr(feature = "serde", serde(tag = "type"))]
243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
244#[repr(u32)]
245#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
246pub enum AisType {
247    #[doc = "Not available (default)."]
248    AIS_TYPE_UNKNOWN = 0,
249    AIS_TYPE_RESERVED_1 = 1,
250    AIS_TYPE_RESERVED_2 = 2,
251    AIS_TYPE_RESERVED_3 = 3,
252    AIS_TYPE_RESERVED_4 = 4,
253    AIS_TYPE_RESERVED_5 = 5,
254    AIS_TYPE_RESERVED_6 = 6,
255    AIS_TYPE_RESERVED_7 = 7,
256    AIS_TYPE_RESERVED_8 = 8,
257    AIS_TYPE_RESERVED_9 = 9,
258    AIS_TYPE_RESERVED_10 = 10,
259    AIS_TYPE_RESERVED_11 = 11,
260    AIS_TYPE_RESERVED_12 = 12,
261    AIS_TYPE_RESERVED_13 = 13,
262    AIS_TYPE_RESERVED_14 = 14,
263    AIS_TYPE_RESERVED_15 = 15,
264    AIS_TYPE_RESERVED_16 = 16,
265    AIS_TYPE_RESERVED_17 = 17,
266    AIS_TYPE_RESERVED_18 = 18,
267    AIS_TYPE_RESERVED_19 = 19,
268    #[doc = "Wing In Ground effect."]
269    AIS_TYPE_WIG = 20,
270    AIS_TYPE_WIG_HAZARDOUS_A = 21,
271    AIS_TYPE_WIG_HAZARDOUS_B = 22,
272    AIS_TYPE_WIG_HAZARDOUS_C = 23,
273    AIS_TYPE_WIG_HAZARDOUS_D = 24,
274    AIS_TYPE_WIG_RESERVED_1 = 25,
275    AIS_TYPE_WIG_RESERVED_2 = 26,
276    AIS_TYPE_WIG_RESERVED_3 = 27,
277    AIS_TYPE_WIG_RESERVED_4 = 28,
278    AIS_TYPE_WIG_RESERVED_5 = 29,
279    AIS_TYPE_FISHING = 30,
280    AIS_TYPE_TOWING = 31,
281    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
282    AIS_TYPE_TOWING_LARGE = 32,
283    #[doc = "Dredging or other underwater ops."]
284    AIS_TYPE_DREDGING = 33,
285    AIS_TYPE_DIVING = 34,
286    AIS_TYPE_MILITARY = 35,
287    AIS_TYPE_SAILING = 36,
288    AIS_TYPE_PLEASURE = 37,
289    AIS_TYPE_RESERVED_20 = 38,
290    AIS_TYPE_RESERVED_21 = 39,
291    #[doc = "High Speed Craft."]
292    AIS_TYPE_HSC = 40,
293    AIS_TYPE_HSC_HAZARDOUS_A = 41,
294    AIS_TYPE_HSC_HAZARDOUS_B = 42,
295    AIS_TYPE_HSC_HAZARDOUS_C = 43,
296    AIS_TYPE_HSC_HAZARDOUS_D = 44,
297    AIS_TYPE_HSC_RESERVED_1 = 45,
298    AIS_TYPE_HSC_RESERVED_2 = 46,
299    AIS_TYPE_HSC_RESERVED_3 = 47,
300    AIS_TYPE_HSC_RESERVED_4 = 48,
301    AIS_TYPE_HSC_UNKNOWN = 49,
302    AIS_TYPE_PILOT = 50,
303    #[doc = "Search And Rescue vessel."]
304    AIS_TYPE_SAR = 51,
305    AIS_TYPE_TUG = 52,
306    AIS_TYPE_PORT_TENDER = 53,
307    #[doc = "Anti-pollution equipment."]
308    AIS_TYPE_ANTI_POLLUTION = 54,
309    AIS_TYPE_LAW_ENFORCEMENT = 55,
310    AIS_TYPE_SPARE_LOCAL_1 = 56,
311    AIS_TYPE_SPARE_LOCAL_2 = 57,
312    AIS_TYPE_MEDICAL_TRANSPORT = 58,
313    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
314    AIS_TYPE_NONECOMBATANT = 59,
315    AIS_TYPE_PASSENGER = 60,
316    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
317    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
318    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
319    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
320    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
321    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
322    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
323    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
324    AIS_TYPE_PASSENGER_UNKNOWN = 69,
325    AIS_TYPE_CARGO = 70,
326    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
327    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
328    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
329    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
330    AIS_TYPE_CARGO_RESERVED_1 = 75,
331    AIS_TYPE_CARGO_RESERVED_2 = 76,
332    AIS_TYPE_CARGO_RESERVED_3 = 77,
333    AIS_TYPE_CARGO_RESERVED_4 = 78,
334    AIS_TYPE_CARGO_UNKNOWN = 79,
335    AIS_TYPE_TANKER = 80,
336    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
337    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
338    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
339    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
340    AIS_TYPE_TANKER_RESERVED_1 = 85,
341    AIS_TYPE_TANKER_RESERVED_2 = 86,
342    AIS_TYPE_TANKER_RESERVED_3 = 87,
343    AIS_TYPE_TANKER_RESERVED_4 = 88,
344    AIS_TYPE_TANKER_UNKNOWN = 89,
345    AIS_TYPE_OTHER = 90,
346    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
347    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
348    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
349    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
350    AIS_TYPE_OTHER_RESERVED_1 = 95,
351    AIS_TYPE_OTHER_RESERVED_2 = 96,
352    AIS_TYPE_OTHER_RESERVED_3 = 97,
353    AIS_TYPE_OTHER_RESERVED_4 = 98,
354    AIS_TYPE_OTHER_UNKNOWN = 99,
355}
356impl AisType {
357    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
358}
359impl Default for AisType {
360    fn default() -> Self {
361        Self::DEFAULT
362    }
363}
364bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
365impl AttitudeTargetTypemask {
366    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
367}
368impl Default for AttitudeTargetTypemask {
369    fn default() -> Self {
370        Self::DEFAULT
371    }
372}
373#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
375#[cfg_attr(feature = "serde", serde(tag = "type"))]
376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
377#[repr(u32)]
378#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
379pub enum AutotuneAxis {
380    #[doc = "Autotune roll axis."]
381    AUTOTUNE_AXIS_ROLL = 1,
382    #[doc = "Autotune pitch axis."]
383    AUTOTUNE_AXIS_PITCH = 2,
384    #[doc = "Autotune yaw axis."]
385    AUTOTUNE_AXIS_YAW = 4,
386}
387impl AutotuneAxis {
388    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
389}
390impl Default for AutotuneAxis {
391    fn default() -> Self {
392        Self::DEFAULT
393    }
394}
395bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
396impl CameraCapFlags {
397    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
398}
399impl Default for CameraCapFlags {
400    fn default() -> Self {
401        Self::DEFAULT
402    }
403}
404#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
406#[cfg_attr(feature = "serde", serde(tag = "type"))]
407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
408#[repr(u32)]
409#[doc = "Camera Modes."]
410pub enum CameraMode {
411    #[doc = "Camera is in image/photo capture mode."]
412    CAMERA_MODE_IMAGE = 0,
413    #[doc = "Camera is in video capture mode."]
414    CAMERA_MODE_VIDEO = 1,
415    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
416    CAMERA_MODE_IMAGE_SURVEY = 2,
417}
418impl CameraMode {
419    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
420}
421impl Default for CameraMode {
422    fn default() -> Self {
423        Self::DEFAULT
424    }
425}
426#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
428#[cfg_attr(feature = "serde", serde(tag = "type"))]
429#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
430#[repr(u32)]
431#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
432pub enum CameraSource {
433    #[doc = "Default camera source."]
434    CAMERA_SOURCE_DEFAULT = 0,
435    #[doc = "RGB camera source."]
436    CAMERA_SOURCE_RGB = 1,
437    #[doc = "IR camera source."]
438    CAMERA_SOURCE_IR = 2,
439    #[doc = "NDVI camera source."]
440    CAMERA_SOURCE_NDVI = 3,
441}
442impl CameraSource {
443    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
444}
445impl Default for CameraSource {
446    fn default() -> Self {
447        Self::DEFAULT
448    }
449}
450#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
451#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
452#[cfg_attr(feature = "serde", serde(tag = "type"))]
453#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
454#[repr(u32)]
455#[doc = "Camera tracking modes"]
456pub enum CameraTrackingMode {
457    #[doc = "Not tracking"]
458    CAMERA_TRACKING_MODE_NONE = 0,
459    #[doc = "Target is a point"]
460    CAMERA_TRACKING_MODE_POINT = 1,
461    #[doc = "Target is a rectangle"]
462    CAMERA_TRACKING_MODE_RECTANGLE = 2,
463}
464impl CameraTrackingMode {
465    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
466}
467impl Default for CameraTrackingMode {
468    fn default() -> Self {
469        Self::DEFAULT
470    }
471}
472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
474#[cfg_attr(feature = "serde", serde(tag = "type"))]
475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
476#[repr(u32)]
477#[doc = "Camera tracking status flags"]
478pub enum CameraTrackingStatusFlags {
479    #[doc = "Camera is not tracking"]
480    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
481    #[doc = "Camera is tracking"]
482    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
483    #[doc = "Camera tracking in error state"]
484    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
485}
486impl CameraTrackingStatusFlags {
487    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
488}
489impl Default for CameraTrackingStatusFlags {
490    fn default() -> Self {
491        Self::DEFAULT
492    }
493}
494bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
495impl CameraTrackingTargetData {
496    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
497}
498impl Default for CameraTrackingTargetData {
499    fn default() -> Self {
500        Self::DEFAULT
501    }
502}
503#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
505#[cfg_attr(feature = "serde", serde(tag = "type"))]
506#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
507#[repr(u32)]
508#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
509pub enum CameraZoomType {
510    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
511    ZOOM_TYPE_STEP = 0,
512    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
513    ZOOM_TYPE_CONTINUOUS = 1,
514    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
515    ZOOM_TYPE_RANGE = 2,
516    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
517    ZOOM_TYPE_FOCAL_LENGTH = 3,
518    #[doc = "Zoom value as horizontal field of view in degrees."]
519    ZOOM_TYPE_HORIZONTAL_FOV = 4,
520}
521impl CameraZoomType {
522    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
523}
524impl Default for CameraZoomType {
525    fn default() -> Self {
526        Self::DEFAULT
527    }
528}
529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
531#[cfg_attr(feature = "serde", serde(tag = "type"))]
532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
533#[repr(u32)]
534pub enum CanFilterOp {
535    CAN_FILTER_REPLACE = 0,
536    CAN_FILTER_ADD = 1,
537    CAN_FILTER_REMOVE = 2,
538}
539impl CanFilterOp {
540    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
541}
542impl Default for CanFilterOp {
543    fn default() -> Self {
544        Self::DEFAULT
545    }
546}
547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
549#[cfg_attr(feature = "serde", serde(tag = "type"))]
550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
551#[repr(u32)]
552#[doc = "Possible responses from a CELLULAR_CONFIG message."]
553pub enum CellularConfigResponse {
554    #[doc = "Changes accepted."]
555    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
556    #[doc = "Invalid APN."]
557    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
558    #[doc = "Invalid PIN."]
559    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
560    #[doc = "Changes rejected."]
561    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
562    #[doc = "PUK is required to unblock SIM card."]
563    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
564}
565impl CellularConfigResponse {
566    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
567}
568impl Default for CellularConfigResponse {
569    fn default() -> Self {
570        Self::DEFAULT
571    }
572}
573#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
575#[cfg_attr(feature = "serde", serde(tag = "type"))]
576#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
577#[repr(u32)]
578#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
579pub enum CellularNetworkFailedReason {
580    #[doc = "No error"]
581    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
582    #[doc = "Error state is unknown"]
583    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
584    #[doc = "SIM is required for the modem but missing"]
585    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
586    #[doc = "SIM is available, but not usable for connection"]
587    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
588}
589impl CellularNetworkFailedReason {
590    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
591}
592impl Default for CellularNetworkFailedReason {
593    fn default() -> Self {
594        Self::DEFAULT
595    }
596}
597#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
599#[cfg_attr(feature = "serde", serde(tag = "type"))]
600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
601#[repr(u32)]
602#[doc = "Cellular network radio type"]
603pub enum CellularNetworkRadioType {
604    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
605    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
606    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
607    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
608    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
609}
610impl CellularNetworkRadioType {
611    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
612}
613impl Default for CellularNetworkRadioType {
614    fn default() -> Self {
615        Self::DEFAULT
616    }
617}
618#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
620#[cfg_attr(feature = "serde", serde(tag = "type"))]
621#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
622#[repr(u32)]
623#[doc = "These flags encode the cellular network status"]
624pub enum CellularStatusFlag {
625    #[doc = "State unknown or not reportable."]
626    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
627    #[doc = "Modem is unusable"]
628    CELLULAR_STATUS_FLAG_FAILED = 1,
629    #[doc = "Modem is being initialized"]
630    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
631    #[doc = "Modem is locked"]
632    CELLULAR_STATUS_FLAG_LOCKED = 3,
633    #[doc = "Modem is not enabled and is powered down"]
634    CELLULAR_STATUS_FLAG_DISABLED = 4,
635    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
636    CELLULAR_STATUS_FLAG_DISABLING = 5,
637    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
638    CELLULAR_STATUS_FLAG_ENABLING = 6,
639    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
640    CELLULAR_STATUS_FLAG_ENABLED = 7,
641    #[doc = "Modem is searching for a network provider to register"]
642    CELLULAR_STATUS_FLAG_SEARCHING = 8,
643    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
644    CELLULAR_STATUS_FLAG_REGISTERED = 9,
645    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
646    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
647    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
648    CELLULAR_STATUS_FLAG_CONNECTING = 11,
649    #[doc = "One or more packet data bearers is active and connected"]
650    CELLULAR_STATUS_FLAG_CONNECTED = 12,
651}
652impl CellularStatusFlag {
653    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
654}
655impl Default for CellularStatusFlag {
656    fn default() -> Self {
657        Self::DEFAULT
658    }
659}
660#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
662#[cfg_attr(feature = "serde", serde(tag = "type"))]
663#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
664#[repr(u32)]
665#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
666pub enum CompMetadataType {
667    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
668    COMP_METADATA_TYPE_GENERAL = 0,
669    #[doc = "Parameter meta data."]
670    COMP_METADATA_TYPE_PARAMETER = 1,
671    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
672    COMP_METADATA_TYPE_COMMANDS = 2,
673    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
674    COMP_METADATA_TYPE_PERIPHERALS = 3,
675    #[doc = "Meta data for the events interface."]
676    COMP_METADATA_TYPE_EVENTS = 4,
677    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
678    COMP_METADATA_TYPE_ACTUATORS = 5,
679}
680impl CompMetadataType {
681    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
682}
683impl Default for CompMetadataType {
684    fn default() -> Self {
685        Self::DEFAULT
686    }
687}
688#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
690#[cfg_attr(feature = "serde", serde(tag = "type"))]
691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
692#[repr(u32)]
693#[doc = "Indicates the ESC connection type."]
694pub enum EscConnectionType {
695    #[doc = "Traditional PPM ESC."]
696    ESC_CONNECTION_TYPE_PPM = 0,
697    #[doc = "Serial Bus connected ESC."]
698    ESC_CONNECTION_TYPE_SERIAL = 1,
699    #[doc = "One Shot PPM ESC."]
700    ESC_CONNECTION_TYPE_ONESHOT = 2,
701    #[doc = "I2C ESC."]
702    ESC_CONNECTION_TYPE_I2C = 3,
703    #[doc = "CAN-Bus ESC."]
704    ESC_CONNECTION_TYPE_CAN = 4,
705    #[doc = "DShot ESC."]
706    ESC_CONNECTION_TYPE_DSHOT = 5,
707}
708impl EscConnectionType {
709    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
710}
711impl Default for EscConnectionType {
712    fn default() -> Self {
713        Self::DEFAULT
714    }
715}
716bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
717impl EscFailureFlags {
718    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
719}
720impl Default for EscFailureFlags {
721    fn default() -> Self {
722        Self::DEFAULT
723    }
724}
725bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
726impl EstimatorStatusFlags {
727    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
728}
729impl Default for EstimatorStatusFlags {
730    fn default() -> Self {
731        Self::DEFAULT
732    }
733}
734#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
736#[cfg_attr(feature = "serde", serde(tag = "type"))]
737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
738#[repr(u32)]
739#[doc = "List of possible failure type to inject."]
740pub enum FailureType {
741    #[doc = "No failure injected, used to reset a previous failure."]
742    FAILURE_TYPE_OK = 0,
743    #[doc = "Sets unit off, so completely non-responsive."]
744    FAILURE_TYPE_OFF = 1,
745    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
746    FAILURE_TYPE_STUCK = 2,
747    #[doc = "Unit is reporting complete garbage."]
748    FAILURE_TYPE_GARBAGE = 3,
749    #[doc = "Unit is consistently wrong."]
750    FAILURE_TYPE_WRONG = 4,
751    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
752    FAILURE_TYPE_SLOW = 5,
753    #[doc = "Data of unit is delayed in time."]
754    FAILURE_TYPE_DELAYED = 6,
755    #[doc = "Unit is sometimes working, sometimes not."]
756    FAILURE_TYPE_INTERMITTENT = 7,
757}
758impl FailureType {
759    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
760}
761impl Default for FailureType {
762    fn default() -> Self {
763        Self::DEFAULT
764    }
765}
766#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
768#[cfg_attr(feature = "serde", serde(tag = "type"))]
769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
770#[repr(u32)]
771#[doc = "List of possible units where failures can be injected."]
772pub enum FailureUnit {
773    FAILURE_UNIT_SENSOR_GYRO = 0,
774    FAILURE_UNIT_SENSOR_ACCEL = 1,
775    FAILURE_UNIT_SENSOR_MAG = 2,
776    FAILURE_UNIT_SENSOR_BARO = 3,
777    FAILURE_UNIT_SENSOR_GPS = 4,
778    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
779    FAILURE_UNIT_SENSOR_VIO = 6,
780    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
781    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
782    FAILURE_UNIT_SYSTEM_BATTERY = 100,
783    FAILURE_UNIT_SYSTEM_MOTOR = 101,
784    FAILURE_UNIT_SYSTEM_SERVO = 102,
785    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
786    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
787    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
788}
789impl FailureUnit {
790    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
791}
792impl Default for FailureUnit {
793    fn default() -> Self {
794        Self::DEFAULT
795    }
796}
797#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
799#[cfg_attr(feature = "serde", serde(tag = "type"))]
800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
801#[repr(u32)]
802pub enum FenceBreach {
803    #[doc = "No last fence breach"]
804    FENCE_BREACH_NONE = 0,
805    #[doc = "Breached minimum altitude"]
806    FENCE_BREACH_MINALT = 1,
807    #[doc = "Breached maximum altitude"]
808    FENCE_BREACH_MAXALT = 2,
809    #[doc = "Breached fence boundary"]
810    FENCE_BREACH_BOUNDARY = 3,
811}
812impl FenceBreach {
813    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
814}
815impl Default for FenceBreach {
816    fn default() -> Self {
817        Self::DEFAULT
818    }
819}
820#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
822#[cfg_attr(feature = "serde", serde(tag = "type"))]
823#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
824#[repr(u32)]
825#[doc = "Actions being taken to mitigate/prevent fence breach"]
826pub enum FenceMitigate {
827    #[doc = "Unknown"]
828    FENCE_MITIGATE_UNKNOWN = 0,
829    #[doc = "No actions being taken"]
830    FENCE_MITIGATE_NONE = 1,
831    #[doc = "Velocity limiting active to prevent breach"]
832    FENCE_MITIGATE_VEL_LIMIT = 2,
833}
834impl FenceMitigate {
835    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
836}
837impl Default for FenceMitigate {
838    fn default() -> Self {
839        Self::DEFAULT
840    }
841}
842#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
844#[cfg_attr(feature = "serde", serde(tag = "type"))]
845#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
846#[repr(u32)]
847#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
848pub enum FenceType {
849    #[doc = "Maximum altitude fence"]
850    FENCE_TYPE_ALT_MAX = 1,
851    #[doc = "Circle fence"]
852    FENCE_TYPE_CIRCLE = 2,
853    #[doc = "Polygon fence"]
854    FENCE_TYPE_POLYGON = 4,
855    #[doc = "Minimum altitude fence"]
856    FENCE_TYPE_ALT_MIN = 8,
857}
858impl FenceType {
859    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
860}
861impl Default for FenceType {
862    fn default() -> Self {
863        Self::DEFAULT
864    }
865}
866#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
867#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
868#[cfg_attr(feature = "serde", serde(tag = "type"))]
869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
870#[repr(u32)]
871#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
872pub enum FirmwareVersionType {
873    #[doc = "development release"]
874    FIRMWARE_VERSION_TYPE_DEV = 0,
875    #[doc = "alpha release"]
876    FIRMWARE_VERSION_TYPE_ALPHA = 64,
877    #[doc = "beta release"]
878    FIRMWARE_VERSION_TYPE_BETA = 128,
879    #[doc = "release candidate"]
880    FIRMWARE_VERSION_TYPE_RC = 192,
881    #[doc = "official stable release"]
882    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
883}
884impl FirmwareVersionType {
885    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
886}
887impl Default for FirmwareVersionType {
888    fn default() -> Self {
889        Self::DEFAULT
890    }
891}
892bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
893impl GimbalDeviceCapFlags {
894    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
895}
896impl Default for GimbalDeviceCapFlags {
897    fn default() -> Self {
898        Self::DEFAULT
899    }
900}
901bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
902impl GimbalDeviceErrorFlags {
903    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
904}
905impl Default for GimbalDeviceErrorFlags {
906    fn default() -> Self {
907        Self::DEFAULT
908    }
909}
910bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
911impl GimbalDeviceFlags {
912    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
913}
914impl Default for GimbalDeviceFlags {
915    fn default() -> Self {
916        Self::DEFAULT
917    }
918}
919bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
920impl GimbalManagerCapFlags {
921    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
922}
923impl Default for GimbalManagerCapFlags {
924    fn default() -> Self {
925        Self::DEFAULT
926    }
927}
928bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
929impl GimbalManagerFlags {
930    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
931}
932impl Default for GimbalManagerFlags {
933    fn default() -> Self {
934        Self::DEFAULT
935    }
936}
937#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
939#[cfg_attr(feature = "serde", serde(tag = "type"))]
940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
941#[repr(u32)]
942#[doc = "Type of GPS fix"]
943pub enum GpsFixType {
944    #[doc = "No GPS connected"]
945    GPS_FIX_TYPE_NO_GPS = 0,
946    #[doc = "No position information, GPS is connected"]
947    GPS_FIX_TYPE_NO_FIX = 1,
948    #[doc = "2D position"]
949    GPS_FIX_TYPE_2D_FIX = 2,
950    #[doc = "3D position"]
951    GPS_FIX_TYPE_3D_FIX = 3,
952    #[doc = "DGPS/SBAS aided 3D position"]
953    GPS_FIX_TYPE_DGPS = 4,
954    #[doc = "RTK float, 3D position"]
955    GPS_FIX_TYPE_RTK_FLOAT = 5,
956    #[doc = "RTK Fixed, 3D position"]
957    GPS_FIX_TYPE_RTK_FIXED = 6,
958    #[doc = "Static fixed, typically used for base stations"]
959    GPS_FIX_TYPE_STATIC = 7,
960    #[doc = "PPP, 3D position."]
961    GPS_FIX_TYPE_PPP = 8,
962}
963impl GpsFixType {
964    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
965}
966impl Default for GpsFixType {
967    fn default() -> Self {
968        Self::DEFAULT
969    }
970}
971bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
972impl GpsInputIgnoreFlags {
973    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
974}
975impl Default for GpsInputIgnoreFlags {
976    fn default() -> Self {
977        Self::DEFAULT
978    }
979}
980#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
981#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
982#[cfg_attr(feature = "serde", serde(tag = "type"))]
983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
984#[repr(u32)]
985#[doc = "Gripper actions."]
986pub enum GripperActions {
987    #[doc = "Gripper release cargo."]
988    GRIPPER_ACTION_RELEASE = 0,
989    #[doc = "Gripper grab onto cargo."]
990    GRIPPER_ACTION_GRAB = 1,
991}
992impl GripperActions {
993    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
994}
995impl Default for GripperActions {
996    fn default() -> Self {
997        Self::DEFAULT
998    }
999}
1000bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1001impl HighresImuUpdatedFlags {
1002    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1003}
1004impl Default for HighresImuUpdatedFlags {
1005    fn default() -> Self {
1006        Self::DEFAULT
1007    }
1008}
1009bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1010impl HilActuatorControlsFlags {
1011    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1012}
1013impl Default for HilActuatorControlsFlags {
1014    fn default() -> Self {
1015        Self::DEFAULT
1016    }
1017}
1018bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1019impl HilSensorUpdatedFlags {
1020    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1021}
1022impl Default for HilSensorUpdatedFlags {
1023    fn default() -> Self {
1024        Self::DEFAULT
1025    }
1026}
1027bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1028impl HlFailureFlag {
1029    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1030}
1031impl Default for HlFailureFlag {
1032    fn default() -> Self {
1033        Self::DEFAULT
1034    }
1035}
1036bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1037impl IlluminatorErrorFlags {
1038    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1039}
1040impl Default for IlluminatorErrorFlags {
1041    fn default() -> Self {
1042        Self::DEFAULT
1043    }
1044}
1045#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1046#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1047#[cfg_attr(feature = "serde", serde(tag = "type"))]
1048#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1049#[repr(u32)]
1050#[doc = "Modes of illuminator"]
1051pub enum IlluminatorMode {
1052    #[doc = "Illuminator mode is not specified/unknown"]
1053    ILLUMINATOR_MODE_UNKNOWN = 0,
1054    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1055    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1056    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1057    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1058}
1059impl IlluminatorMode {
1060    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1061}
1062impl Default for IlluminatorMode {
1063    fn default() -> Self {
1064        Self::DEFAULT
1065    }
1066}
1067#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1068#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1069#[cfg_attr(feature = "serde", serde(tag = "type"))]
1070#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1071#[repr(u32)]
1072#[doc = "Type of landing target"]
1073pub enum LandingTargetType {
1074    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1075    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1076    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1077    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1078    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1079    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1080    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1081    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1082}
1083impl LandingTargetType {
1084    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1085}
1086impl Default for LandingTargetType {
1087    fn default() -> Self {
1088        Self::DEFAULT
1089    }
1090}
1091#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1092#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1093#[cfg_attr(feature = "serde", serde(tag = "type"))]
1094#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1095#[repr(u32)]
1096pub enum MagCalStatus {
1097    MAG_CAL_NOT_STARTED = 0,
1098    MAG_CAL_WAITING_TO_START = 1,
1099    MAG_CAL_RUNNING_STEP_ONE = 2,
1100    MAG_CAL_RUNNING_STEP_TWO = 3,
1101    MAG_CAL_SUCCESS = 4,
1102    MAG_CAL_FAILED = 5,
1103    MAG_CAL_BAD_ORIENTATION = 6,
1104    MAG_CAL_BAD_RADIUS = 7,
1105}
1106impl MagCalStatus {
1107    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1108}
1109impl Default for MagCalStatus {
1110    fn default() -> Self {
1111        Self::DEFAULT
1112    }
1113}
1114#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1115#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1116#[cfg_attr(feature = "serde", serde(tag = "type"))]
1117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1118#[repr(u32)]
1119pub enum MavArmAuthDeniedReason {
1120    #[doc = "Not a specific reason"]
1121    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1122    #[doc = "Authorizer will send the error as string to GCS"]
1123    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1124    #[doc = "At least one waypoint have a invalid value"]
1125    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1126    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1127    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1128    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1129    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1130    #[doc = "Weather is not good to fly"]
1131    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1132}
1133impl MavArmAuthDeniedReason {
1134    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1135}
1136impl Default for MavArmAuthDeniedReason {
1137    fn default() -> Self {
1138        Self::DEFAULT
1139    }
1140}
1141#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1143#[cfg_attr(feature = "serde", serde(tag = "type"))]
1144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1145#[repr(u32)]
1146#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1147pub enum MavAutopilot {
1148    #[doc = "Generic autopilot, full support for everything"]
1149    MAV_AUTOPILOT_GENERIC = 0,
1150    #[doc = "Reserved for future use."]
1151    MAV_AUTOPILOT_RESERVED = 1,
1152    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1153    MAV_AUTOPILOT_SLUGS = 2,
1154    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1155    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1156    #[doc = "OpenPilot, <http://openpilot.org>"]
1157    MAV_AUTOPILOT_OPENPILOT = 4,
1158    #[doc = "Generic autopilot only supporting simple waypoints"]
1159    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1160    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1161    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1162    #[doc = "Generic autopilot supporting the full mission command set"]
1163    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1164    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1165    MAV_AUTOPILOT_INVALID = 8,
1166    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1167    MAV_AUTOPILOT_PPZ = 9,
1168    #[doc = "UAV Dev Board"]
1169    MAV_AUTOPILOT_UDB = 10,
1170    #[doc = "FlexiPilot"]
1171    MAV_AUTOPILOT_FP = 11,
1172    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1173    MAV_AUTOPILOT_PX4 = 12,
1174    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1175    MAV_AUTOPILOT_SMACCMPILOT = 13,
1176    #[doc = "AutoQuad -- <http://autoquad.org>"]
1177    MAV_AUTOPILOT_AUTOQUAD = 14,
1178    #[doc = "Armazila -- <http://armazila.com>"]
1179    MAV_AUTOPILOT_ARMAZILA = 15,
1180    #[doc = "Aerob -- <http://aerob.ru>"]
1181    MAV_AUTOPILOT_AEROB = 16,
1182    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1183    MAV_AUTOPILOT_ASLUAV = 17,
1184    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1185    MAV_AUTOPILOT_SMARTAP = 18,
1186    #[doc = "AirRails - <http://uaventure.com>"]
1187    MAV_AUTOPILOT_AIRRAILS = 19,
1188    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1189    MAV_AUTOPILOT_REFLEX = 20,
1190}
1191impl MavAutopilot {
1192    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1193}
1194impl Default for MavAutopilot {
1195    fn default() -> Self {
1196        Self::DEFAULT
1197    }
1198}
1199#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1200#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1201#[cfg_attr(feature = "serde", serde(tag = "type"))]
1202#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1203#[repr(u32)]
1204#[doc = "Enumeration for battery charge states."]
1205pub enum MavBatteryChargeState {
1206    #[doc = "Low battery state is not provided"]
1207    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1208    #[doc = "Battery is not in low state. Normal operation."]
1209    MAV_BATTERY_CHARGE_STATE_OK = 1,
1210    #[doc = "Battery state is low, warn and monitor close."]
1211    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1212    #[doc = "Battery state is critical, return or abort immediately."]
1213    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1214    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1215    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1216    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1217    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1218    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1219    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1220    #[doc = "Battery is charging."]
1221    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1222}
1223impl MavBatteryChargeState {
1224    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1225}
1226impl Default for MavBatteryChargeState {
1227    fn default() -> Self {
1228        Self::DEFAULT
1229    }
1230}
1231bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1232impl MavBatteryFault {
1233    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1234}
1235impl Default for MavBatteryFault {
1236    fn default() -> Self {
1237        Self::DEFAULT
1238    }
1239}
1240#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1242#[cfg_attr(feature = "serde", serde(tag = "type"))]
1243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1244#[repr(u32)]
1245#[doc = "Enumeration of battery functions"]
1246pub enum MavBatteryFunction {
1247    #[doc = "Battery function is unknown"]
1248    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1249    #[doc = "Battery supports all flight systems"]
1250    MAV_BATTERY_FUNCTION_ALL = 1,
1251    #[doc = "Battery for the propulsion system"]
1252    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1253    #[doc = "Avionics battery"]
1254    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1255    #[doc = "Payload battery"]
1256    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1257}
1258impl MavBatteryFunction {
1259    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1260}
1261impl Default for MavBatteryFunction {
1262    fn default() -> Self {
1263        Self::DEFAULT
1264    }
1265}
1266#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1268#[cfg_attr(feature = "serde", serde(tag = "type"))]
1269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1270#[repr(u32)]
1271#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1272pub enum MavBatteryMode {
1273    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1274    MAV_BATTERY_MODE_UNKNOWN = 0,
1275    #[doc = "Battery is auto discharging (towards storage level)."]
1276    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1277    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1278    MAV_BATTERY_MODE_HOT_SWAP = 2,
1279}
1280impl MavBatteryMode {
1281    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1282}
1283impl Default for MavBatteryMode {
1284    fn default() -> Self {
1285        Self::DEFAULT
1286    }
1287}
1288#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1290#[cfg_attr(feature = "serde", serde(tag = "type"))]
1291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1292#[repr(u32)]
1293#[doc = "Enumeration of battery types"]
1294pub enum MavBatteryType {
1295    #[doc = "Not specified."]
1296    MAV_BATTERY_TYPE_UNKNOWN = 0,
1297    #[doc = "Lithium polymer battery"]
1298    MAV_BATTERY_TYPE_LIPO = 1,
1299    #[doc = "Lithium-iron-phosphate battery"]
1300    MAV_BATTERY_TYPE_LIFE = 2,
1301    #[doc = "Lithium-ION battery"]
1302    MAV_BATTERY_TYPE_LION = 3,
1303    #[doc = "Nickel metal hydride battery"]
1304    MAV_BATTERY_TYPE_NIMH = 4,
1305}
1306impl MavBatteryType {
1307    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1308}
1309impl Default for MavBatteryType {
1310    fn default() -> Self {
1311        Self::DEFAULT
1312    }
1313}
1314#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1316#[cfg_attr(feature = "serde", serde(tag = "type"))]
1317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1318#[repr(u32)]
1319#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1320pub enum MavCmd {
1321    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1322    MAV_CMD_NAV_WAYPOINT = 16,
1323    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1324    MAV_CMD_NAV_LOITER_UNLIM = 17,
1325    #[doc = "Loiter around this waypoint for X turns"]
1326    MAV_CMD_NAV_LOITER_TURNS = 18,
1327    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1328    MAV_CMD_NAV_LOITER_TIME = 19,
1329    #[doc = "Return to launch location"]
1330    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1331    #[doc = "Land at location."]
1332    MAV_CMD_NAV_LAND = 21,
1333    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1334    MAV_CMD_NAV_TAKEOFF = 22,
1335    #[doc = "Land at local position (local frame only)"]
1336    MAV_CMD_NAV_LAND_LOCAL = 23,
1337    #[doc = "Takeoff from local position (local frame only)"]
1338    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1339    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1340    MAV_CMD_NAV_FOLLOW = 25,
1341    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1342    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1343    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1344    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1345    #[doc = "Begin following a target"]
1346    MAV_CMD_DO_FOLLOW = 32,
1347    #[doc = "Reposition the MAV after a follow target command has been sent"]
1348    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1349    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1350    MAV_CMD_DO_ORBIT = 34,
1351    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1352    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1353    MAV_CMD_NAV_ROI = 80,
1354    #[doc = "Control autonomous path planning on the MAV."]
1355    MAV_CMD_NAV_PATHPLANNING = 81,
1356    #[doc = "Navigate to waypoint using a spline path."]
1357    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1358    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1359    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1360    #[doc = "Land using VTOL mode"]
1361    MAV_CMD_NAV_VTOL_LAND = 85,
1362    #[doc = "hand control over to an external controller"]
1363    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1364    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1365    MAV_CMD_NAV_DELAY = 93,
1366    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1367    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1368    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1369    MAV_CMD_NAV_LAST = 95,
1370    #[doc = "Delay mission state machine."]
1371    MAV_CMD_CONDITION_DELAY = 112,
1372    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1373    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1374    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1375    MAV_CMD_CONDITION_DISTANCE = 114,
1376    #[doc = "Reach a certain target angle."]
1377    MAV_CMD_CONDITION_YAW = 115,
1378    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1379    MAV_CMD_CONDITION_LAST = 159,
1380    #[doc = "Set system mode."]
1381    MAV_CMD_DO_SET_MODE = 176,
1382    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1383    MAV_CMD_DO_JUMP = 177,
1384    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1385    MAV_CMD_DO_CHANGE_SPEED = 178,
1386    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1387    MAV_CMD_DO_SET_HOME = 179,
1388    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1389    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1390    MAV_CMD_DO_SET_PARAMETER = 180,
1391    #[doc = "Set a relay to a condition."]
1392    MAV_CMD_DO_SET_RELAY = 181,
1393    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1394    MAV_CMD_DO_REPEAT_RELAY = 182,
1395    #[doc = "Set a servo to a desired PWM value."]
1396    MAV_CMD_DO_SET_SERVO = 183,
1397    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1398    MAV_CMD_DO_REPEAT_SERVO = 184,
1399    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1400    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1401    #[doc = "Change altitude set point."]
1402    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1403    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1404    MAV_CMD_DO_SET_ACTUATOR = 187,
1405    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1406    MAV_CMD_DO_RETURN_PATH_START = 188,
1407    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1408    MAV_CMD_DO_LAND_START = 189,
1409    #[doc = "Mission command to perform a landing from a rally point."]
1410    MAV_CMD_DO_RALLY_LAND = 190,
1411    #[doc = "Mission command to safely abort an autonomous landing."]
1412    MAV_CMD_DO_GO_AROUND = 191,
1413    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1414    MAV_CMD_DO_REPOSITION = 192,
1415    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1416    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1417    #[doc = "Set moving direction to forward or reverse."]
1418    MAV_CMD_DO_SET_REVERSE = 194,
1419    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1420    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1421    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1422    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1423    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1424    MAV_CMD_DO_SET_ROI_NONE = 197,
1425    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1426    MAV_CMD_DO_SET_ROI_SYSID = 198,
1427    #[doc = "Control onboard camera system."]
1428    MAV_CMD_DO_CONTROL_VIDEO = 200,
1429    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1430    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1431    MAV_CMD_DO_SET_ROI = 201,
1432    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1433    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1434    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1435    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1436    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1437    #[doc = "Mission command to configure a camera or antenna mount"]
1438    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1439    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1440    #[doc = "Mission command to control a camera or antenna mount"]
1441    MAV_CMD_DO_MOUNT_CONTROL = 205,
1442    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1443    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1444    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1445    MAV_CMD_DO_FENCE_ENABLE = 207,
1446    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1447    MAV_CMD_DO_PARACHUTE = 208,
1448    #[doc = "Command to perform motor test."]
1449    MAV_CMD_DO_MOTOR_TEST = 209,
1450    #[doc = "Change to/from inverted flight."]
1451    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1452    #[doc = "Mission command to operate a gripper."]
1453    MAV_CMD_DO_GRIPPER = 211,
1454    #[doc = "Enable/disable autotune."]
1455    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1456    #[doc = "Sets a desired vehicle turn angle and speed change."]
1457    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1458    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1459    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1460    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1461    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1462    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1463    #[doc = "set id of master controller"]
1464    MAV_CMD_DO_GUIDED_MASTER = 221,
1465    #[doc = "Set limits for external control"]
1466    MAV_CMD_DO_GUIDED_LIMITS = 222,
1467    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1468    MAV_CMD_DO_ENGINE_CONTROL = 223,
1469    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1470    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1471    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1472    MAV_CMD_DO_LAST = 240,
1473    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1474    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1475    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1476    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1477    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1478    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1479    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1480    MAV_CMD_PREFLIGHT_STORAGE = 245,
1481    #[doc = "Request the reboot or shutdown of system components."]
1482    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1483    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1484    MAV_CMD_OVERRIDE_GOTO = 252,
1485    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1486    MAV_CMD_OBLIQUE_SURVEY = 260,
1487    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1488    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1489    #[doc = "start running a mission"]
1490    MAV_CMD_MISSION_START = 300,
1491    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1492    MAV_CMD_ACTUATOR_TEST = 310,
1493    #[doc = "Actuator configuration command."]
1494    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1495    #[doc = "Arms / Disarms a component"]
1496    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1497    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1498    MAV_CMD_RUN_PREARM_CHECKS = 401,
1499    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1500    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1501    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1502    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1503    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1504    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1505    MAV_CMD_GET_HOME_POSITION = 410,
1506    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1507    MAV_CMD_INJECT_FAILURE = 420,
1508    #[doc = "Starts receiver pairing."]
1509    MAV_CMD_START_RX_PAIR = 500,
1510    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1511    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1512    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1513    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1514    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1515    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1516    MAV_CMD_REQUEST_MESSAGE = 512,
1517    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1518    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1519    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1520    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1521    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1522    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1523    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1524    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1525    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1526    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1527    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1528    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1529    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1530    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1531    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1532    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1533    MAV_CMD_STORAGE_FORMAT = 526,
1534    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1535    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1536    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1537    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1538    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1539    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1540    #[doc = "Reset all camera settings to Factory Default"]
1541    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1542    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1543    MAV_CMD_SET_CAMERA_MODE = 530,
1544    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1545    MAV_CMD_SET_CAMERA_ZOOM = 531,
1546    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1547    MAV_CMD_SET_CAMERA_FOCUS = 532,
1548    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1549    MAV_CMD_SET_STORAGE_USAGE = 533,
1550    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1551    MAV_CMD_SET_CAMERA_SOURCE = 534,
1552    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1553    MAV_CMD_JUMP_TAG = 600,
1554    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1555    MAV_CMD_DO_JUMP_TAG = 601,
1556    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1557    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1558    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1559    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1560    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1561    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1562    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1563    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1564    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1565    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1566    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1567    #[doc = "Enable or disable on-board camera triggering system."]
1568    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1569    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1570    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1571    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1572    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1573    #[doc = "Stops ongoing tracking."]
1574    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1575    #[doc = "Starts video capture (recording)."]
1576    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1577    #[doc = "Stop the current video capture (recording)."]
1578    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1579    #[doc = "Start video streaming"]
1580    MAV_CMD_VIDEO_START_STREAMING = 2502,
1581    #[doc = "Stop the given video stream"]
1582    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1583    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1584    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1585    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1586    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1587    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1588    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1589    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1590    MAV_CMD_LOGGING_START = 2510,
1591    #[doc = "Request to stop streaming log data over MAVLink"]
1592    MAV_CMD_LOGGING_STOP = 2511,
1593    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1594    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1595    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1596    #[doc = "Create a panorama at the current position"]
1597    MAV_CMD_PANORAMA_CREATE = 2800,
1598    #[doc = "Request VTOL transition"]
1599    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1600    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1601    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1602    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1603    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1604    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1605    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1606    #[doc = "Delay mission state machine until gate has been reached."]
1607    MAV_CMD_CONDITION_GATE = 4501,
1608    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1609    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1610    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1611    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1612    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1613    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1614    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1615    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1616    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1617    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1618    #[doc = "Rally point. You can have multiple rally points defined."]
1619    MAV_CMD_NAV_RALLY_POINT = 5100,
1620    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1621    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1622    #[doc = "Change state of safety switch."]
1623    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1624    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1625    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1626    #[deprecated = "  (Deprecated since 2021-06)"]
1627    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1628    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1629    #[deprecated = "  (Deprecated since 2021-06)"]
1630    #[doc = "Control the payload deployment."]
1631    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1632    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1633    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1634    #[doc = "Command to operate winch."]
1635    MAV_CMD_DO_WINCH = 42600,
1636    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1637    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1638    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1639    MAV_CMD_WAYPOINT_USER_1 = 31000,
1640    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1641    MAV_CMD_WAYPOINT_USER_2 = 31001,
1642    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1643    MAV_CMD_WAYPOINT_USER_3 = 31002,
1644    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1645    MAV_CMD_WAYPOINT_USER_4 = 31003,
1646    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1647    MAV_CMD_WAYPOINT_USER_5 = 31004,
1648    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1649    MAV_CMD_SPATIAL_USER_1 = 31005,
1650    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1651    MAV_CMD_SPATIAL_USER_2 = 31006,
1652    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1653    MAV_CMD_SPATIAL_USER_3 = 31007,
1654    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1655    MAV_CMD_SPATIAL_USER_4 = 31008,
1656    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1657    MAV_CMD_SPATIAL_USER_5 = 31009,
1658    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1659    MAV_CMD_USER_1 = 31010,
1660    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1661    MAV_CMD_USER_2 = 31011,
1662    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1663    MAV_CMD_USER_3 = 31012,
1664    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1665    MAV_CMD_USER_4 = 31013,
1666    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1667    MAV_CMD_USER_5 = 31014,
1668    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1669    MAV_CMD_CAN_FORWARD = 32000,
1670    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1671    MAV_CMD_PREFLIGHT_STORAGE_ADVANCED = 0,
1672}
1673impl MavCmd {
1674    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1675}
1676impl Default for MavCmd {
1677    fn default() -> Self {
1678        Self::DEFAULT
1679    }
1680}
1681#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1682#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1683#[cfg_attr(feature = "serde", serde(tag = "type"))]
1684#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1685#[repr(u32)]
1686#[doc = "Possible actions an aircraft can take to avoid a collision."]
1687pub enum MavCollisionAction {
1688    #[doc = "Ignore any potential collisions"]
1689    MAV_COLLISION_ACTION_NONE = 0,
1690    #[doc = "Report potential collision"]
1691    MAV_COLLISION_ACTION_REPORT = 1,
1692    #[doc = "Ascend or Descend to avoid threat"]
1693    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1694    #[doc = "Move horizontally to avoid threat"]
1695    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1696    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1697    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1698    #[doc = "Aircraft to fly directly back to its launch point"]
1699    MAV_COLLISION_ACTION_RTL = 5,
1700    #[doc = "Aircraft to stop in place"]
1701    MAV_COLLISION_ACTION_HOVER = 6,
1702}
1703impl MavCollisionAction {
1704    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1705}
1706impl Default for MavCollisionAction {
1707    fn default() -> Self {
1708        Self::DEFAULT
1709    }
1710}
1711#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1713#[cfg_attr(feature = "serde", serde(tag = "type"))]
1714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1715#[repr(u32)]
1716#[doc = "Source of information about this collision."]
1717pub enum MavCollisionSrc {
1718    #[doc = "ID field references ADSB_VEHICLE packets"]
1719    MAV_COLLISION_SRC_ADSB = 0,
1720    #[doc = "ID field references MAVLink SRC ID"]
1721    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1722}
1723impl MavCollisionSrc {
1724    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1725}
1726impl Default for MavCollisionSrc {
1727    fn default() -> Self {
1728        Self::DEFAULT
1729    }
1730}
1731#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1733#[cfg_attr(feature = "serde", serde(tag = "type"))]
1734#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1735#[repr(u32)]
1736#[doc = "Aircraft-rated danger from this threat."]
1737pub enum MavCollisionThreatLevel {
1738    #[doc = "Not a threat"]
1739    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1740    #[doc = "Craft is mildly concerned about this threat"]
1741    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1742    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1743    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1744}
1745impl MavCollisionThreatLevel {
1746    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1747}
1748impl Default for MavCollisionThreatLevel {
1749    fn default() -> Self {
1750        Self::DEFAULT
1751    }
1752}
1753#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1754#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1755#[cfg_attr(feature = "serde", serde(tag = "type"))]
1756#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1757#[repr(u32)]
1758#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1759pub enum MavComponent {
1760    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1761    MAV_COMP_ID_ALL = 0,
1762    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1763    MAV_COMP_ID_AUTOPILOT1 = 1,
1764    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1765    MAV_COMP_ID_USER1 = 25,
1766    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1767    MAV_COMP_ID_USER2 = 26,
1768    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1769    MAV_COMP_ID_USER3 = 27,
1770    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1771    MAV_COMP_ID_USER4 = 28,
1772    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1773    MAV_COMP_ID_USER5 = 29,
1774    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1775    MAV_COMP_ID_USER6 = 30,
1776    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1777    MAV_COMP_ID_USER7 = 31,
1778    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1779    MAV_COMP_ID_USER8 = 32,
1780    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1781    MAV_COMP_ID_USER9 = 33,
1782    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1783    MAV_COMP_ID_USER10 = 34,
1784    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1785    MAV_COMP_ID_USER11 = 35,
1786    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1787    MAV_COMP_ID_USER12 = 36,
1788    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1789    MAV_COMP_ID_USER13 = 37,
1790    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1791    MAV_COMP_ID_USER14 = 38,
1792    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1793    MAV_COMP_ID_USER15 = 39,
1794    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1795    MAV_COMP_ID_USER16 = 40,
1796    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1797    MAV_COMP_ID_USER17 = 41,
1798    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1799    MAV_COMP_ID_USER18 = 42,
1800    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1801    MAV_COMP_ID_USER19 = 43,
1802    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1803    MAV_COMP_ID_USER20 = 44,
1804    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1805    MAV_COMP_ID_USER21 = 45,
1806    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1807    MAV_COMP_ID_USER22 = 46,
1808    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1809    MAV_COMP_ID_USER23 = 47,
1810    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1811    MAV_COMP_ID_USER24 = 48,
1812    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1813    MAV_COMP_ID_USER25 = 49,
1814    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1815    MAV_COMP_ID_USER26 = 50,
1816    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1817    MAV_COMP_ID_USER27 = 51,
1818    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1819    MAV_COMP_ID_USER28 = 52,
1820    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1821    MAV_COMP_ID_USER29 = 53,
1822    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1823    MAV_COMP_ID_USER30 = 54,
1824    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1825    MAV_COMP_ID_USER31 = 55,
1826    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1827    MAV_COMP_ID_USER32 = 56,
1828    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1829    MAV_COMP_ID_USER33 = 57,
1830    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1831    MAV_COMP_ID_USER34 = 58,
1832    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1833    MAV_COMP_ID_USER35 = 59,
1834    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1835    MAV_COMP_ID_USER36 = 60,
1836    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1837    MAV_COMP_ID_USER37 = 61,
1838    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1839    MAV_COMP_ID_USER38 = 62,
1840    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1841    MAV_COMP_ID_USER39 = 63,
1842    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1843    MAV_COMP_ID_USER40 = 64,
1844    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1845    MAV_COMP_ID_USER41 = 65,
1846    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1847    MAV_COMP_ID_USER42 = 66,
1848    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1849    MAV_COMP_ID_USER43 = 67,
1850    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1851    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER45 = 69,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER46 = 70,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER47 = 71,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER48 = 72,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER49 = 73,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER50 = 74,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER51 = 75,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER52 = 76,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER53 = 77,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER54 = 78,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER55 = 79,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER56 = 80,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER57 = 81,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER58 = 82,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER59 = 83,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER60 = 84,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER61 = 85,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER62 = 86,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER63 = 87,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER64 = 88,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER65 = 89,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER66 = 90,
1896    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1897    MAV_COMP_ID_USER67 = 91,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER68 = 92,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER69 = 93,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER70 = 94,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER71 = 95,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER72 = 96,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER73 = 97,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER74 = 98,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER75 = 99,
1914    #[doc = "Camera #1."]
1915    MAV_COMP_ID_CAMERA = 100,
1916    #[doc = "Camera #2."]
1917    MAV_COMP_ID_CAMERA2 = 101,
1918    #[doc = "Camera #3."]
1919    MAV_COMP_ID_CAMERA3 = 102,
1920    #[doc = "Camera #4."]
1921    MAV_COMP_ID_CAMERA4 = 103,
1922    #[doc = "Camera #5."]
1923    MAV_COMP_ID_CAMERA5 = 104,
1924    #[doc = "Camera #6."]
1925    MAV_COMP_ID_CAMERA6 = 105,
1926    #[doc = "Servo #1."]
1927    MAV_COMP_ID_SERVO1 = 140,
1928    #[doc = "Servo #2."]
1929    MAV_COMP_ID_SERVO2 = 141,
1930    #[doc = "Servo #3."]
1931    MAV_COMP_ID_SERVO3 = 142,
1932    #[doc = "Servo #4."]
1933    MAV_COMP_ID_SERVO4 = 143,
1934    #[doc = "Servo #5."]
1935    MAV_COMP_ID_SERVO5 = 144,
1936    #[doc = "Servo #6."]
1937    MAV_COMP_ID_SERVO6 = 145,
1938    #[doc = "Servo #7."]
1939    MAV_COMP_ID_SERVO7 = 146,
1940    #[doc = "Servo #8."]
1941    MAV_COMP_ID_SERVO8 = 147,
1942    #[doc = "Servo #9."]
1943    MAV_COMP_ID_SERVO9 = 148,
1944    #[doc = "Servo #10."]
1945    MAV_COMP_ID_SERVO10 = 149,
1946    #[doc = "Servo #11."]
1947    MAV_COMP_ID_SERVO11 = 150,
1948    #[doc = "Servo #12."]
1949    MAV_COMP_ID_SERVO12 = 151,
1950    #[doc = "Servo #13."]
1951    MAV_COMP_ID_SERVO13 = 152,
1952    #[doc = "Servo #14."]
1953    MAV_COMP_ID_SERVO14 = 153,
1954    #[doc = "Gimbal #1."]
1955    MAV_COMP_ID_GIMBAL = 154,
1956    #[doc = "Logging component."]
1957    MAV_COMP_ID_LOG = 155,
1958    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
1959    MAV_COMP_ID_ADSB = 156,
1960    #[doc = "On Screen Display (OSD) devices for video links."]
1961    MAV_COMP_ID_OSD = 157,
1962    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
1963    MAV_COMP_ID_PERIPHERAL = 158,
1964    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
1965    #[doc = "Gimbal ID for QX1."]
1966    MAV_COMP_ID_QX1_GIMBAL = 159,
1967    #[doc = "FLARM collision alert component."]
1968    MAV_COMP_ID_FLARM = 160,
1969    #[doc = "Parachute component."]
1970    MAV_COMP_ID_PARACHUTE = 161,
1971    #[doc = "Winch component."]
1972    MAV_COMP_ID_WINCH = 169,
1973    #[doc = "Gimbal #2."]
1974    MAV_COMP_ID_GIMBAL2 = 171,
1975    #[doc = "Gimbal #3."]
1976    MAV_COMP_ID_GIMBAL3 = 172,
1977    #[doc = "Gimbal #4"]
1978    MAV_COMP_ID_GIMBAL4 = 173,
1979    #[doc = "Gimbal #5."]
1980    MAV_COMP_ID_GIMBAL5 = 174,
1981    #[doc = "Gimbal #6."]
1982    MAV_COMP_ID_GIMBAL6 = 175,
1983    #[doc = "Battery #1."]
1984    MAV_COMP_ID_BATTERY = 180,
1985    #[doc = "Battery #2."]
1986    MAV_COMP_ID_BATTERY2 = 181,
1987    #[doc = "CAN over MAVLink client."]
1988    MAV_COMP_ID_MAVCAN = 189,
1989    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
1990    MAV_COMP_ID_MISSIONPLANNER = 190,
1991    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1992    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
1993    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1994    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
1995    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1996    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
1997    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1998    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
1999    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2000    MAV_COMP_ID_PATHPLANNER = 195,
2001    #[doc = "Component that plans a collision free path between two points."]
2002    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2003    #[doc = "Component that provides position estimates using VIO techniques."]
2004    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2005    #[doc = "Component that manages pairing of vehicle and GCS."]
2006    MAV_COMP_ID_PAIRING_MANAGER = 198,
2007    #[doc = "Inertial Measurement Unit (IMU) #1."]
2008    MAV_COMP_ID_IMU = 200,
2009    #[doc = "Inertial Measurement Unit (IMU) #2."]
2010    MAV_COMP_ID_IMU_2 = 201,
2011    #[doc = "Inertial Measurement Unit (IMU) #3."]
2012    MAV_COMP_ID_IMU_3 = 202,
2013    #[doc = "GPS #1."]
2014    MAV_COMP_ID_GPS = 220,
2015    #[doc = "GPS #2."]
2016    MAV_COMP_ID_GPS2 = 221,
2017    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2018    MAV_COMP_ID_ODID_TXRX_1 = 236,
2019    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2020    MAV_COMP_ID_ODID_TXRX_2 = 237,
2021    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2022    MAV_COMP_ID_ODID_TXRX_3 = 238,
2023    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2024    MAV_COMP_ID_UDP_BRIDGE = 240,
2025    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2026    MAV_COMP_ID_UART_BRIDGE = 241,
2027    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2028    MAV_COMP_ID_TUNNEL_NODE = 242,
2029    #[doc = "Illuminator"]
2030    MAV_COMP_ID_ILLUMINATOR = 243,
2031    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2032    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2033    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2034}
2035impl MavComponent {
2036    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2037}
2038impl Default for MavComponent {
2039    fn default() -> Self {
2040        Self::DEFAULT
2041    }
2042}
2043#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2045#[cfg_attr(feature = "serde", serde(tag = "type"))]
2046#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2047#[repr(u32)]
2048#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2049#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2050pub enum MavDataStream {
2051    #[doc = "Enable all data streams"]
2052    MAV_DATA_STREAM_ALL = 0,
2053    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2054    MAV_DATA_STREAM_RAW_SENSORS = 1,
2055    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2056    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2057    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2058    MAV_DATA_STREAM_RC_CHANNELS = 3,
2059    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2060    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2061    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2062    MAV_DATA_STREAM_POSITION = 6,
2063    #[doc = "Dependent on the autopilot"]
2064    MAV_DATA_STREAM_EXTRA1 = 10,
2065    #[doc = "Dependent on the autopilot"]
2066    MAV_DATA_STREAM_EXTRA2 = 11,
2067    #[doc = "Dependent on the autopilot"]
2068    MAV_DATA_STREAM_EXTRA3 = 12,
2069}
2070impl MavDataStream {
2071    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2072}
2073impl Default for MavDataStream {
2074    fn default() -> Self {
2075        Self::DEFAULT
2076    }
2077}
2078#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2079#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2080#[cfg_attr(feature = "serde", serde(tag = "type"))]
2081#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2082#[repr(u32)]
2083#[doc = "Enumeration of distance sensor types"]
2084pub enum MavDistanceSensor {
2085    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2086    MAV_DISTANCE_SENSOR_LASER = 0,
2087    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2088    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2089    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2090    MAV_DISTANCE_SENSOR_INFRARED = 2,
2091    #[doc = "Radar type, e.g. uLanding units"]
2092    MAV_DISTANCE_SENSOR_RADAR = 3,
2093    #[doc = "Broken or unknown type, e.g. analog units"]
2094    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2095}
2096impl MavDistanceSensor {
2097    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2098}
2099impl Default for MavDistanceSensor {
2100    fn default() -> Self {
2101        Self::DEFAULT
2102    }
2103}
2104#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2105#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2106#[cfg_attr(feature = "serde", serde(tag = "type"))]
2107#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2108#[repr(u32)]
2109#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2110pub enum MavDoRepositionFlags {
2111    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2112    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2113}
2114impl MavDoRepositionFlags {
2115    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2116}
2117impl Default for MavDoRepositionFlags {
2118    fn default() -> Self {
2119        Self::DEFAULT
2120    }
2121}
2122#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2123#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2124#[cfg_attr(feature = "serde", serde(tag = "type"))]
2125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2126#[repr(u32)]
2127#[doc = "Enumeration of estimator types"]
2128pub enum MavEstimatorType {
2129    #[doc = "Unknown type of the estimator."]
2130    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2131    #[doc = "This is a naive estimator without any real covariance feedback."]
2132    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2133    #[doc = "Computer vision based estimate. Might be up to scale."]
2134    MAV_ESTIMATOR_TYPE_VISION = 2,
2135    #[doc = "Visual-inertial estimate."]
2136    MAV_ESTIMATOR_TYPE_VIO = 3,
2137    #[doc = "Plain GPS estimate."]
2138    MAV_ESTIMATOR_TYPE_GPS = 4,
2139    #[doc = "Estimator integrating GPS and inertial sensing."]
2140    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2141    #[doc = "Estimate from external motion capturing system."]
2142    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2143    #[doc = "Estimator based on lidar sensor input."]
2144    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2145    #[doc = "Estimator on autopilot."]
2146    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2147}
2148impl MavEstimatorType {
2149    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2150}
2151impl Default for MavEstimatorType {
2152    fn default() -> Self {
2153        Self::DEFAULT
2154    }
2155}
2156#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2157#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2158#[cfg_attr(feature = "serde", serde(tag = "type"))]
2159#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2160#[repr(u32)]
2161#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2162pub enum MavEventCurrentSequenceFlags {
2163    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2164    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2165}
2166impl MavEventCurrentSequenceFlags {
2167    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2168}
2169impl Default for MavEventCurrentSequenceFlags {
2170    fn default() -> Self {
2171        Self::DEFAULT
2172    }
2173}
2174#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2175#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2176#[cfg_attr(feature = "serde", serde(tag = "type"))]
2177#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2178#[repr(u32)]
2179#[doc = "Reason for an event error response."]
2180pub enum MavEventErrorReason {
2181    #[doc = "The requested event is not available (anymore)."]
2182    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2183}
2184impl MavEventErrorReason {
2185    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2186}
2187impl Default for MavEventErrorReason {
2188    fn default() -> Self {
2189        Self::DEFAULT
2190    }
2191}
2192#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2193#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2194#[cfg_attr(feature = "serde", serde(tag = "type"))]
2195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2196#[repr(u32)]
2197#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2198pub enum MavFrame {
2199    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2200    MAV_FRAME_GLOBAL = 0,
2201    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2202    MAV_FRAME_LOCAL_NED = 1,
2203    #[doc = "NOT a coordinate frame, indicates a mission command."]
2204    MAV_FRAME_MISSION = 2,
2205    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2206    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2207    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2208    MAV_FRAME_LOCAL_ENU = 4,
2209    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2210    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2211    MAV_FRAME_GLOBAL_INT = 5,
2212    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2213    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2214    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2215    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2216    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2217    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2218    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2219    MAV_FRAME_BODY_NED = 8,
2220    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2221    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2222    MAV_FRAME_BODY_OFFSET_NED = 9,
2223    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2224    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2225    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2226    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2227    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2228    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2229    MAV_FRAME_BODY_FRD = 12,
2230    #[deprecated = "  (Deprecated since 2019-04)"]
2231    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2232    MAV_FRAME_RESERVED_13 = 13,
2233    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2234    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2235    MAV_FRAME_RESERVED_14 = 14,
2236    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2237    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2238    MAV_FRAME_RESERVED_15 = 15,
2239    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2240    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2241    MAV_FRAME_RESERVED_16 = 16,
2242    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2243    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2244    MAV_FRAME_RESERVED_17 = 17,
2245    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2246    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2247    MAV_FRAME_RESERVED_18 = 18,
2248    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2249    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2250    MAV_FRAME_RESERVED_19 = 19,
2251    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2252    MAV_FRAME_LOCAL_FRD = 20,
2253    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2254    MAV_FRAME_LOCAL_FLU = 21,
2255}
2256impl MavFrame {
2257    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2258}
2259impl Default for MavFrame {
2260    fn default() -> Self {
2261        Self::DEFAULT
2262    }
2263}
2264#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2266#[cfg_attr(feature = "serde", serde(tag = "type"))]
2267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2268#[repr(u32)]
2269#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2270pub enum MavFtpErr {
2271    #[doc = "None: No error"]
2272    MAV_FTP_ERR_NONE = 0,
2273    #[doc = "Fail: Unknown failure"]
2274    MAV_FTP_ERR_FAIL = 1,
2275    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2276    MAV_FTP_ERR_FAILERRNO = 2,
2277    #[doc = "InvalidDataSize: Payload size is invalid"]
2278    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2279    #[doc = "InvalidSession: Session is not currently open"]
2280    MAV_FTP_ERR_INVALIDSESSION = 4,
2281    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2282    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2283    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2284    MAV_FTP_ERR_EOF = 6,
2285    #[doc = "UnknownCommand: Unknown command / opcode"]
2286    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2287    #[doc = "FileExists: File/directory already exists"]
2288    MAV_FTP_ERR_FILEEXISTS = 8,
2289    #[doc = "FileProtected: File/directory is write protected"]
2290    MAV_FTP_ERR_FILEPROTECTED = 9,
2291    #[doc = "FileNotFound: File/directory not found"]
2292    MAV_FTP_ERR_FILENOTFOUND = 10,
2293}
2294impl MavFtpErr {
2295    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2296}
2297impl Default for MavFtpErr {
2298    fn default() -> Self {
2299        Self::DEFAULT
2300    }
2301}
2302#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2303#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2304#[cfg_attr(feature = "serde", serde(tag = "type"))]
2305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2306#[repr(u32)]
2307#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2308pub enum MavFtpOpcode {
2309    #[doc = "None. Ignored, always ACKed"]
2310    MAV_FTP_OPCODE_NONE = 0,
2311    #[doc = "TerminateSession: Terminates open Read session"]
2312    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2313    #[doc = "ResetSessions: Terminates all open read sessions"]
2314    MAV_FTP_OPCODE_RESETSESSION = 2,
2315    #[doc = "ListDirectory. List files and directories in path from offset"]
2316    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2317    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2318    MAV_FTP_OPCODE_OPENFILERO = 4,
2319    #[doc = "ReadFile: Reads size bytes from offset in session"]
2320    MAV_FTP_OPCODE_READFILE = 5,
2321    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2322    MAV_FTP_OPCODE_CREATEFILE = 6,
2323    #[doc = "WriteFile: Writes size bytes to offset in session"]
2324    MAV_FTP_OPCODE_WRITEFILE = 7,
2325    #[doc = "RemoveFile: Remove file at path"]
2326    MAV_FTP_OPCODE_REMOVEFILE = 8,
2327    #[doc = "CreateDirectory: Creates directory at path"]
2328    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2329    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2330    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2331    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2332    MAV_FTP_OPCODE_OPENFILEWO = 11,
2333    #[doc = "TruncateFile: Truncate file at path to offset length"]
2334    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2335    #[doc = "Rename: Rename path1 to path2"]
2336    MAV_FTP_OPCODE_RENAME = 13,
2337    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2338    MAV_FTP_OPCODE_CALCFILECRC = 14,
2339    #[doc = "BurstReadFile: Burst download session file"]
2340    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2341    #[doc = "ACK: ACK response"]
2342    MAV_FTP_OPCODE_ACK = 128,
2343    #[doc = "NAK: NAK response"]
2344    MAV_FTP_OPCODE_NAK = 129,
2345}
2346impl MavFtpOpcode {
2347    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2348}
2349impl Default for MavFtpOpcode {
2350    fn default() -> Self {
2351        Self::DEFAULT
2352    }
2353}
2354#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2355#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2356#[cfg_attr(feature = "serde", serde(tag = "type"))]
2357#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2358#[repr(u32)]
2359#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2360pub enum MavFuelType {
2361    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2362    MAV_FUEL_TYPE_UNKNOWN = 0,
2363    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2364    MAV_FUEL_TYPE_LIQUID = 1,
2365    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2366    MAV_FUEL_TYPE_GAS = 2,
2367}
2368impl MavFuelType {
2369    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2370}
2371impl Default for MavFuelType {
2372    fn default() -> Self {
2373        Self::DEFAULT
2374    }
2375}
2376bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2377impl MavGeneratorStatusFlag {
2378    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2379}
2380impl Default for MavGeneratorStatusFlag {
2381    fn default() -> Self {
2382        Self::DEFAULT
2383    }
2384}
2385#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2386#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2387#[cfg_attr(feature = "serde", serde(tag = "type"))]
2388#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2389#[repr(u32)]
2390#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2391pub enum MavGoto {
2392    #[doc = "Hold at the current position."]
2393    MAV_GOTO_DO_HOLD = 0,
2394    #[doc = "Continue with the next item in mission execution."]
2395    MAV_GOTO_DO_CONTINUE = 1,
2396    #[doc = "Hold at the current position of the system"]
2397    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2398    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2399    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2400}
2401impl MavGoto {
2402    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2403}
2404impl Default for MavGoto {
2405    fn default() -> Self {
2406        Self::DEFAULT
2407    }
2408}
2409#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2410#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2411#[cfg_attr(feature = "serde", serde(tag = "type"))]
2412#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2413#[repr(u32)]
2414#[doc = "Enumeration of landed detector states"]
2415pub enum MavLandedState {
2416    #[doc = "MAV landed state is unknown"]
2417    MAV_LANDED_STATE_UNDEFINED = 0,
2418    #[doc = "MAV is landed (on ground)"]
2419    MAV_LANDED_STATE_ON_GROUND = 1,
2420    #[doc = "MAV is in air"]
2421    MAV_LANDED_STATE_IN_AIR = 2,
2422    #[doc = "MAV currently taking off"]
2423    MAV_LANDED_STATE_TAKEOFF = 3,
2424    #[doc = "MAV currently landing"]
2425    MAV_LANDED_STATE_LANDING = 4,
2426}
2427impl MavLandedState {
2428    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2429}
2430impl Default for MavLandedState {
2431    fn default() -> Self {
2432        Self::DEFAULT
2433    }
2434}
2435#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2436#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2437#[cfg_attr(feature = "serde", serde(tag = "type"))]
2438#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2439#[repr(u32)]
2440#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2441pub enum MavMissionResult {
2442    #[doc = "mission accepted OK"]
2443    MAV_MISSION_ACCEPTED = 0,
2444    #[doc = "Generic error / not accepting mission commands at all right now."]
2445    MAV_MISSION_ERROR = 1,
2446    #[doc = "Coordinate frame is not supported."]
2447    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2448    #[doc = "Command is not supported."]
2449    MAV_MISSION_UNSUPPORTED = 3,
2450    #[doc = "Mission items exceed storage space."]
2451    MAV_MISSION_NO_SPACE = 4,
2452    #[doc = "One of the parameters has an invalid value."]
2453    MAV_MISSION_INVALID = 5,
2454    #[doc = "param1 has an invalid value."]
2455    MAV_MISSION_INVALID_PARAM1 = 6,
2456    #[doc = "param2 has an invalid value."]
2457    MAV_MISSION_INVALID_PARAM2 = 7,
2458    #[doc = "param3 has an invalid value."]
2459    MAV_MISSION_INVALID_PARAM3 = 8,
2460    #[doc = "param4 has an invalid value."]
2461    MAV_MISSION_INVALID_PARAM4 = 9,
2462    #[doc = "x / param5 has an invalid value."]
2463    MAV_MISSION_INVALID_PARAM5_X = 10,
2464    #[doc = "y / param6 has an invalid value."]
2465    MAV_MISSION_INVALID_PARAM6_Y = 11,
2466    #[doc = "z / param7 has an invalid value."]
2467    MAV_MISSION_INVALID_PARAM7 = 12,
2468    #[doc = "Mission item received out of sequence"]
2469    MAV_MISSION_INVALID_SEQUENCE = 13,
2470    #[doc = "Not accepting any mission commands from this communication partner."]
2471    MAV_MISSION_DENIED = 14,
2472    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2473    MAV_MISSION_OPERATION_CANCELLED = 15,
2474}
2475impl MavMissionResult {
2476    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2477}
2478impl Default for MavMissionResult {
2479    fn default() -> Self {
2480        Self::DEFAULT
2481    }
2482}
2483#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2484#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2485#[cfg_attr(feature = "serde", serde(tag = "type"))]
2486#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2487#[repr(u32)]
2488#[doc = "Type of mission items being requested/sent in mission protocol."]
2489pub enum MavMissionType {
2490    #[doc = "Items are mission commands for main mission."]
2491    MAV_MISSION_TYPE_MISSION = 0,
2492    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2493    MAV_MISSION_TYPE_FENCE = 1,
2494    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2495    MAV_MISSION_TYPE_RALLY = 2,
2496    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2497    MAV_MISSION_TYPE_ALL = 255,
2498}
2499impl MavMissionType {
2500    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2501}
2502impl Default for MavMissionType {
2503    fn default() -> Self {
2504        Self::DEFAULT
2505    }
2506}
2507#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2508#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2509#[cfg_attr(feature = "serde", serde(tag = "type"))]
2510#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2511#[repr(u32)]
2512#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2513pub enum MavMode {
2514    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2515    MAV_MODE_PREFLIGHT = 0,
2516    #[doc = "System is allowed to be active, under assisted RC control."]
2517    MAV_MODE_STABILIZE_DISARMED = 80,
2518    #[doc = "System is allowed to be active, under assisted RC control."]
2519    MAV_MODE_STABILIZE_ARMED = 208,
2520    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2521    MAV_MODE_MANUAL_DISARMED = 64,
2522    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2523    MAV_MODE_MANUAL_ARMED = 192,
2524    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2525    MAV_MODE_GUIDED_DISARMED = 88,
2526    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2527    MAV_MODE_GUIDED_ARMED = 216,
2528    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2529    MAV_MODE_AUTO_DISARMED = 92,
2530    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2531    MAV_MODE_AUTO_ARMED = 220,
2532    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2533    MAV_MODE_TEST_DISARMED = 66,
2534    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2535    MAV_MODE_TEST_ARMED = 194,
2536}
2537impl MavMode {
2538    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2539}
2540impl Default for MavMode {
2541    fn default() -> Self {
2542        Self::DEFAULT
2543    }
2544}
2545bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2546impl MavModeFlag {
2547    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2548}
2549impl Default for MavModeFlag {
2550    fn default() -> Self {
2551        Self::DEFAULT
2552    }
2553}
2554#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2555#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2556#[cfg_attr(feature = "serde", serde(tag = "type"))]
2557#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2558#[repr(u32)]
2559#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2560pub enum MavModeFlagDecodePosition {
2561    #[doc = "First bit:  10000000"]
2562    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2563    #[doc = "Second bit: 01000000"]
2564    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2565    #[doc = "Third bit:  00100000"]
2566    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2567    #[doc = "Fourth bit: 00010000"]
2568    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2569    #[doc = "Fifth bit:  00001000"]
2570    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2571    #[doc = "Sixth bit:   00000100"]
2572    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2573    #[doc = "Seventh bit: 00000010"]
2574    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2575    #[doc = "Eighth bit: 00000001"]
2576    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2577}
2578impl MavModeFlagDecodePosition {
2579    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2580}
2581impl Default for MavModeFlagDecodePosition {
2582    fn default() -> Self {
2583        Self::DEFAULT
2584    }
2585}
2586bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2587impl MavModeProperty {
2588    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2589}
2590impl Default for MavModeProperty {
2591    fn default() -> Self {
2592        Self::DEFAULT
2593    }
2594}
2595#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2597#[cfg_attr(feature = "serde", serde(tag = "type"))]
2598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2599#[repr(u32)]
2600#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2601#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2602pub enum MavMountMode {
2603    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2604    MAV_MOUNT_MODE_RETRACT = 0,
2605    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2606    MAV_MOUNT_MODE_NEUTRAL = 1,
2607    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2608    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2609    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2610    MAV_MOUNT_MODE_RC_TARGETING = 3,
2611    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2612    MAV_MOUNT_MODE_GPS_POINT = 4,
2613    #[doc = "Gimbal tracks system with specified system ID"]
2614    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2615    #[doc = "Gimbal tracks home position"]
2616    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2617}
2618impl MavMountMode {
2619    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2620}
2621impl Default for MavMountMode {
2622    fn default() -> Self {
2623        Self::DEFAULT
2624    }
2625}
2626#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2627#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2628#[cfg_attr(feature = "serde", serde(tag = "type"))]
2629#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2630#[repr(u32)]
2631pub enum MavOdidArmStatus {
2632    #[doc = "Passing arming checks."]
2633    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2634    #[doc = "Generic arming failure, see error string for details."]
2635    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2636}
2637impl MavOdidArmStatus {
2638    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2639}
2640impl Default for MavOdidArmStatus {
2641    fn default() -> Self {
2642        Self::DEFAULT
2643    }
2644}
2645#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2647#[cfg_attr(feature = "serde", serde(tag = "type"))]
2648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2649#[repr(u32)]
2650pub enum MavOdidAuthType {
2651    #[doc = "No authentication type is specified."]
2652    MAV_ODID_AUTH_TYPE_NONE = 0,
2653    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2654    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2655    #[doc = "Signature for the Operator ID."]
2656    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2657    #[doc = "Signature for the entire message set."]
2658    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2659    #[doc = "Authentication is provided by Network Remote ID."]
2660    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2661    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2662    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2663}
2664impl MavOdidAuthType {
2665    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2666}
2667impl Default for MavOdidAuthType {
2668    fn default() -> Self {
2669        Self::DEFAULT
2670    }
2671}
2672#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2674#[cfg_attr(feature = "serde", serde(tag = "type"))]
2675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2676#[repr(u32)]
2677pub enum MavOdidCategoryEu {
2678    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2679    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2680    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2681    MAV_ODID_CATEGORY_EU_OPEN = 1,
2682    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2683    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2684    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2685    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2686}
2687impl MavOdidCategoryEu {
2688    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2689}
2690impl Default for MavOdidCategoryEu {
2691    fn default() -> Self {
2692        Self::DEFAULT
2693    }
2694}
2695#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2696#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2697#[cfg_attr(feature = "serde", serde(tag = "type"))]
2698#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2699#[repr(u32)]
2700pub enum MavOdidClassEu {
2701    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2702    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2703    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2704    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2705    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2706    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2707    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2708    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2709    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2710    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2711    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2712    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2713    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2714    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2715    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2716    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2717}
2718impl MavOdidClassEu {
2719    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2720}
2721impl Default for MavOdidClassEu {
2722    fn default() -> Self {
2723        Self::DEFAULT
2724    }
2725}
2726#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2727#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2728#[cfg_attr(feature = "serde", serde(tag = "type"))]
2729#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2730#[repr(u32)]
2731pub enum MavOdidClassificationType {
2732    #[doc = "The classification type for the UA is undeclared."]
2733    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2734    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2735    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2736}
2737impl MavOdidClassificationType {
2738    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2739}
2740impl Default for MavOdidClassificationType {
2741    fn default() -> Self {
2742        Self::DEFAULT
2743    }
2744}
2745#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2746#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2747#[cfg_attr(feature = "serde", serde(tag = "type"))]
2748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2749#[repr(u32)]
2750pub enum MavOdidDescType {
2751    #[doc = "Optional free-form text description of the purpose of the flight."]
2752    MAV_ODID_DESC_TYPE_TEXT = 0,
2753    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2754    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2755    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2756    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2757}
2758impl MavOdidDescType {
2759    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2760}
2761impl Default for MavOdidDescType {
2762    fn default() -> Self {
2763        Self::DEFAULT
2764    }
2765}
2766#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2768#[cfg_attr(feature = "serde", serde(tag = "type"))]
2769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2770#[repr(u32)]
2771pub enum MavOdidHeightRef {
2772    #[doc = "The height field is relative to the take-off location."]
2773    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2774    #[doc = "The height field is relative to ground."]
2775    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2776}
2777impl MavOdidHeightRef {
2778    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2779}
2780impl Default for MavOdidHeightRef {
2781    fn default() -> Self {
2782        Self::DEFAULT
2783    }
2784}
2785#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2786#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2787#[cfg_attr(feature = "serde", serde(tag = "type"))]
2788#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2789#[repr(u32)]
2790pub enum MavOdidHorAcc {
2791    #[doc = "The horizontal accuracy is unknown."]
2792    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2793    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2794    MAV_ODID_HOR_ACC_10NM = 1,
2795    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2796    MAV_ODID_HOR_ACC_4NM = 2,
2797    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2798    MAV_ODID_HOR_ACC_2NM = 3,
2799    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2800    MAV_ODID_HOR_ACC_1NM = 4,
2801    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2802    MAV_ODID_HOR_ACC_0_5NM = 5,
2803    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2804    MAV_ODID_HOR_ACC_0_3NM = 6,
2805    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2806    MAV_ODID_HOR_ACC_0_1NM = 7,
2807    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2808    MAV_ODID_HOR_ACC_0_05NM = 8,
2809    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2810    MAV_ODID_HOR_ACC_30_METER = 9,
2811    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2812    MAV_ODID_HOR_ACC_10_METER = 10,
2813    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2814    MAV_ODID_HOR_ACC_3_METER = 11,
2815    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2816    MAV_ODID_HOR_ACC_1_METER = 12,
2817}
2818impl MavOdidHorAcc {
2819    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2820}
2821impl Default for MavOdidHorAcc {
2822    fn default() -> Self {
2823        Self::DEFAULT
2824    }
2825}
2826#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2827#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2828#[cfg_attr(feature = "serde", serde(tag = "type"))]
2829#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2830#[repr(u32)]
2831pub enum MavOdidIdType {
2832    #[doc = "No type defined."]
2833    MAV_ODID_ID_TYPE_NONE = 0,
2834    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2835    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2836    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2837    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2838    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2839    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2840    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2841    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2842}
2843impl MavOdidIdType {
2844    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2845}
2846impl Default for MavOdidIdType {
2847    fn default() -> Self {
2848        Self::DEFAULT
2849    }
2850}
2851#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2852#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2853#[cfg_attr(feature = "serde", serde(tag = "type"))]
2854#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2855#[repr(u32)]
2856pub enum MavOdidOperatorIdType {
2857    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2858    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2859}
2860impl MavOdidOperatorIdType {
2861    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
2862}
2863impl Default for MavOdidOperatorIdType {
2864    fn default() -> Self {
2865        Self::DEFAULT
2866    }
2867}
2868#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2870#[cfg_attr(feature = "serde", serde(tag = "type"))]
2871#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2872#[repr(u32)]
2873pub enum MavOdidOperatorLocationType {
2874    #[doc = "The location/altitude of the operator is the same as the take-off location."]
2875    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
2876    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
2877    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
2878    #[doc = "The location/altitude of the operator are fixed values."]
2879    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
2880}
2881impl MavOdidOperatorLocationType {
2882    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
2883}
2884impl Default for MavOdidOperatorLocationType {
2885    fn default() -> Self {
2886        Self::DEFAULT
2887    }
2888}
2889#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2890#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2891#[cfg_attr(feature = "serde", serde(tag = "type"))]
2892#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2893#[repr(u32)]
2894pub enum MavOdidSpeedAcc {
2895    #[doc = "The speed accuracy is unknown."]
2896    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
2897    #[doc = "The speed accuracy is smaller than 10 meters per second."]
2898    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
2899    #[doc = "The speed accuracy is smaller than 3 meters per second."]
2900    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
2901    #[doc = "The speed accuracy is smaller than 1 meters per second."]
2902    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
2903    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
2904    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
2905}
2906impl MavOdidSpeedAcc {
2907    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
2908}
2909impl Default for MavOdidSpeedAcc {
2910    fn default() -> Self {
2911        Self::DEFAULT
2912    }
2913}
2914#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2916#[cfg_attr(feature = "serde", serde(tag = "type"))]
2917#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2918#[repr(u32)]
2919pub enum MavOdidStatus {
2920    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
2921    MAV_ODID_STATUS_UNDECLARED = 0,
2922    #[doc = "The UA is on the ground."]
2923    MAV_ODID_STATUS_GROUND = 1,
2924    #[doc = "The UA is in the air."]
2925    MAV_ODID_STATUS_AIRBORNE = 2,
2926    #[doc = "The UA is having an emergency."]
2927    MAV_ODID_STATUS_EMERGENCY = 3,
2928    #[doc = "The remote ID system is failing or unreliable in some way."]
2929    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
2930}
2931impl MavOdidStatus {
2932    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
2933}
2934impl Default for MavOdidStatus {
2935    fn default() -> Self {
2936        Self::DEFAULT
2937    }
2938}
2939#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2940#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2941#[cfg_attr(feature = "serde", serde(tag = "type"))]
2942#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2943#[repr(u32)]
2944pub enum MavOdidTimeAcc {
2945    #[doc = "The timestamp accuracy is unknown."]
2946    MAV_ODID_TIME_ACC_UNKNOWN = 0,
2947    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
2948    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
2949    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
2950    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
2951    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
2952    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
2953    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
2954    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
2955    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
2956    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
2957    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
2958    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
2959    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
2960    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
2961    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
2962    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
2963    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
2964    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
2965    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
2966    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
2967    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
2968    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
2969    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
2970    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
2971    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
2972    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
2973    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
2974    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
2975    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
2976    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
2977}
2978impl MavOdidTimeAcc {
2979    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
2980}
2981impl Default for MavOdidTimeAcc {
2982    fn default() -> Self {
2983        Self::DEFAULT
2984    }
2985}
2986#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2987#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2988#[cfg_attr(feature = "serde", serde(tag = "type"))]
2989#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2990#[repr(u32)]
2991pub enum MavOdidUaType {
2992    #[doc = "No UA (Unmanned Aircraft) type defined."]
2993    MAV_ODID_UA_TYPE_NONE = 0,
2994    #[doc = "Aeroplane/Airplane. Fixed wing."]
2995    MAV_ODID_UA_TYPE_AEROPLANE = 1,
2996    #[doc = "Helicopter or multirotor."]
2997    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
2998    #[doc = "Gyroplane."]
2999    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3000    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3001    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3002    #[doc = "Ornithopter."]
3003    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3004    #[doc = "Glider."]
3005    MAV_ODID_UA_TYPE_GLIDER = 6,
3006    #[doc = "Kite."]
3007    MAV_ODID_UA_TYPE_KITE = 7,
3008    #[doc = "Free Balloon."]
3009    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3010    #[doc = "Captive Balloon."]
3011    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3012    #[doc = "Airship. E.g. a blimp."]
3013    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3014    #[doc = "Free Fall/Parachute (unpowered)."]
3015    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3016    #[doc = "Rocket."]
3017    MAV_ODID_UA_TYPE_ROCKET = 12,
3018    #[doc = "Tethered powered aircraft."]
3019    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3020    #[doc = "Ground Obstacle."]
3021    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3022    #[doc = "Other type of aircraft not listed earlier."]
3023    MAV_ODID_UA_TYPE_OTHER = 15,
3024}
3025impl MavOdidUaType {
3026    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3027}
3028impl Default for MavOdidUaType {
3029    fn default() -> Self {
3030        Self::DEFAULT
3031    }
3032}
3033#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3034#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3035#[cfg_attr(feature = "serde", serde(tag = "type"))]
3036#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3037#[repr(u32)]
3038pub enum MavOdidVerAcc {
3039    #[doc = "The vertical accuracy is unknown."]
3040    MAV_ODID_VER_ACC_UNKNOWN = 0,
3041    #[doc = "The vertical accuracy is smaller than 150 meter."]
3042    MAV_ODID_VER_ACC_150_METER = 1,
3043    #[doc = "The vertical accuracy is smaller than 45 meter."]
3044    MAV_ODID_VER_ACC_45_METER = 2,
3045    #[doc = "The vertical accuracy is smaller than 25 meter."]
3046    MAV_ODID_VER_ACC_25_METER = 3,
3047    #[doc = "The vertical accuracy is smaller than 10 meter."]
3048    MAV_ODID_VER_ACC_10_METER = 4,
3049    #[doc = "The vertical accuracy is smaller than 3 meter."]
3050    MAV_ODID_VER_ACC_3_METER = 5,
3051    #[doc = "The vertical accuracy is smaller than 1 meter."]
3052    MAV_ODID_VER_ACC_1_METER = 6,
3053}
3054impl MavOdidVerAcc {
3055    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3056}
3057impl Default for MavOdidVerAcc {
3058    fn default() -> Self {
3059        Self::DEFAULT
3060    }
3061}
3062#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3063#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3064#[cfg_attr(feature = "serde", serde(tag = "type"))]
3065#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3066#[repr(u32)]
3067#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3068pub enum MavParamExtType {
3069    #[doc = "8-bit unsigned integer"]
3070    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3071    #[doc = "8-bit signed integer"]
3072    MAV_PARAM_EXT_TYPE_INT8 = 2,
3073    #[doc = "16-bit unsigned integer"]
3074    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3075    #[doc = "16-bit signed integer"]
3076    MAV_PARAM_EXT_TYPE_INT16 = 4,
3077    #[doc = "32-bit unsigned integer"]
3078    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3079    #[doc = "32-bit signed integer"]
3080    MAV_PARAM_EXT_TYPE_INT32 = 6,
3081    #[doc = "64-bit unsigned integer"]
3082    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3083    #[doc = "64-bit signed integer"]
3084    MAV_PARAM_EXT_TYPE_INT64 = 8,
3085    #[doc = "32-bit floating-point"]
3086    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3087    #[doc = "64-bit floating-point"]
3088    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3089    #[doc = "Custom Type"]
3090    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3091}
3092impl MavParamExtType {
3093    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3094}
3095impl Default for MavParamExtType {
3096    fn default() -> Self {
3097        Self::DEFAULT
3098    }
3099}
3100#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3101#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3102#[cfg_attr(feature = "serde", serde(tag = "type"))]
3103#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3104#[repr(u32)]
3105#[doc = "Specifies the datatype of a MAVLink parameter."]
3106pub enum MavParamType {
3107    #[doc = "8-bit unsigned integer"]
3108    MAV_PARAM_TYPE_UINT8 = 1,
3109    #[doc = "8-bit signed integer"]
3110    MAV_PARAM_TYPE_INT8 = 2,
3111    #[doc = "16-bit unsigned integer"]
3112    MAV_PARAM_TYPE_UINT16 = 3,
3113    #[doc = "16-bit signed integer"]
3114    MAV_PARAM_TYPE_INT16 = 4,
3115    #[doc = "32-bit unsigned integer"]
3116    MAV_PARAM_TYPE_UINT32 = 5,
3117    #[doc = "32-bit signed integer"]
3118    MAV_PARAM_TYPE_INT32 = 6,
3119    #[doc = "64-bit unsigned integer"]
3120    MAV_PARAM_TYPE_UINT64 = 7,
3121    #[doc = "64-bit signed integer"]
3122    MAV_PARAM_TYPE_INT64 = 8,
3123    #[doc = "32-bit floating-point"]
3124    MAV_PARAM_TYPE_REAL32 = 9,
3125    #[doc = "64-bit floating-point"]
3126    MAV_PARAM_TYPE_REAL64 = 10,
3127}
3128impl MavParamType {
3129    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3130}
3131impl Default for MavParamType {
3132    fn default() -> Self {
3133        Self::DEFAULT
3134    }
3135}
3136bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3137impl MavPowerStatus {
3138    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3139}
3140impl Default for MavPowerStatus {
3141    fn default() -> Self {
3142        Self::DEFAULT
3143    }
3144}
3145#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3146#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3147#[cfg_attr(feature = "serde", serde(tag = "type"))]
3148#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3149#[repr(u32)]
3150#[doc = "Action required when performing CMD_PREFLIGHT_STORAGE"]
3151pub enum MavPreflightStorageAction {
3152    #[doc = "Read all parameters from storage"]
3153    MAV_PFS_CMD_READ_ALL = 0,
3154    #[doc = "Write all parameters to storage"]
3155    MAV_PFS_CMD_WRITE_ALL = 1,
3156    #[doc = "Clear all  parameters in storage"]
3157    MAV_PFS_CMD_CLEAR_ALL = 2,
3158    #[doc = "Read specific parameters from storage"]
3159    MAV_PFS_CMD_READ_SPECIFIC = 3,
3160    #[doc = "Write specific parameters to storage"]
3161    MAV_PFS_CMD_WRITE_SPECIFIC = 4,
3162    #[doc = "Clear specific parameters in storage"]
3163    MAV_PFS_CMD_CLEAR_SPECIFIC = 5,
3164    #[doc = "do nothing"]
3165    MAV_PFS_CMD_DO_NOTHING = 6,
3166}
3167impl MavPreflightStorageAction {
3168    pub const DEFAULT: Self = Self::MAV_PFS_CMD_READ_ALL;
3169}
3170impl Default for MavPreflightStorageAction {
3171    fn default() -> Self {
3172        Self::DEFAULT
3173    }
3174}
3175bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3176impl MavProtocolCapability {
3177    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3178}
3179impl Default for MavProtocolCapability {
3180    fn default() -> Self {
3181        Self::DEFAULT
3182    }
3183}
3184#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3185#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3186#[cfg_attr(feature = "serde", serde(tag = "type"))]
3187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3188#[repr(u32)]
3189#[doc = "Result from a MAVLink command (MAV_CMD)"]
3190pub enum MavResult {
3191    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3192    MAV_RESULT_ACCEPTED = 0,
3193    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3194    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3195    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3196    MAV_RESULT_DENIED = 2,
3197    #[doc = "Command is not supported (unknown)."]
3198    MAV_RESULT_UNSUPPORTED = 3,
3199    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3200    MAV_RESULT_FAILED = 4,
3201    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3202    MAV_RESULT_IN_PROGRESS = 5,
3203    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3204    MAV_RESULT_CANCELLED = 6,
3205    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3206    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3207    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3208    MAV_RESULT_COMMAND_INT_ONLY = 8,
3209    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3210    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3211}
3212impl MavResult {
3213    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3214}
3215impl Default for MavResult {
3216    fn default() -> Self {
3217        Self::DEFAULT
3218    }
3219}
3220#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3222#[cfg_attr(feature = "serde", serde(tag = "type"))]
3223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3224#[repr(u32)]
3225#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3226#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3227pub enum MavRoi {
3228    #[doc = "No region of interest."]
3229    MAV_ROI_NONE = 0,
3230    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3231    MAV_ROI_WPNEXT = 1,
3232    #[doc = "Point toward given waypoint."]
3233    MAV_ROI_WPINDEX = 2,
3234    #[doc = "Point toward fixed location."]
3235    MAV_ROI_LOCATION = 3,
3236    #[doc = "Point toward of given id."]
3237    MAV_ROI_TARGET = 4,
3238}
3239impl MavRoi {
3240    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3241}
3242impl Default for MavRoi {
3243    fn default() -> Self {
3244        Self::DEFAULT
3245    }
3246}
3247#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3249#[cfg_attr(feature = "serde", serde(tag = "type"))]
3250#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3251#[repr(u32)]
3252#[doc = "Enumeration of sensor orientation, according to its rotations"]
3253pub enum MavSensorOrientation {
3254    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3255    MAV_SENSOR_ROTATION_NONE = 0,
3256    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3257    MAV_SENSOR_ROTATION_YAW_45 = 1,
3258    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3259    MAV_SENSOR_ROTATION_YAW_90 = 2,
3260    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3261    MAV_SENSOR_ROTATION_YAW_135 = 3,
3262    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3263    MAV_SENSOR_ROTATION_YAW_180 = 4,
3264    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3265    MAV_SENSOR_ROTATION_YAW_225 = 5,
3266    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3267    MAV_SENSOR_ROTATION_YAW_270 = 6,
3268    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3269    MAV_SENSOR_ROTATION_YAW_315 = 7,
3270    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3271    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3272    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3273    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3274    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3275    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3276    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3277    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3278    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3279    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3280    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3281    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3282    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3283    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3284    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3285    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3286    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3287    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3288    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3289    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3290    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3291    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3292    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3293    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3294    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3295    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3296    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3297    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3298    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3299    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3300    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3301    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3302    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3303    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3304    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3305    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3306    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3307    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3308    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3309    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3310    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3311    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3312    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3313    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3314    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3315    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3316    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3317    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3318    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3319    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3320    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3321    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3322    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3323    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3324    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3325    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3326    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3327    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3328    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3329    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3330    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3331    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3332    #[doc = "Pitch: 315"]
3333    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3334    #[doc = "Roll: 90, Pitch: 315"]
3335    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3336    #[doc = "Custom orientation"]
3337    MAV_SENSOR_ROTATION_CUSTOM = 100,
3338}
3339impl MavSensorOrientation {
3340    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3341}
3342impl Default for MavSensorOrientation {
3343    fn default() -> Self {
3344        Self::DEFAULT
3345    }
3346}
3347#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3348#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3349#[cfg_attr(feature = "serde", serde(tag = "type"))]
3350#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3351#[repr(u32)]
3352#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3353pub enum MavSeverity {
3354    #[doc = "System is unusable. This is a \"panic\" condition."]
3355    MAV_SEVERITY_EMERGENCY = 0,
3356    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3357    MAV_SEVERITY_ALERT = 1,
3358    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3359    MAV_SEVERITY_CRITICAL = 2,
3360    #[doc = "Indicates an error in secondary/redundant systems."]
3361    MAV_SEVERITY_ERROR = 3,
3362    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3363    MAV_SEVERITY_WARNING = 4,
3364    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3365    MAV_SEVERITY_NOTICE = 5,
3366    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3367    MAV_SEVERITY_INFO = 6,
3368    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3369    MAV_SEVERITY_DEBUG = 7,
3370}
3371impl MavSeverity {
3372    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3373}
3374impl Default for MavSeverity {
3375    fn default() -> Self {
3376        Self::DEFAULT
3377    }
3378}
3379#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3380#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3381#[cfg_attr(feature = "serde", serde(tag = "type"))]
3382#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3383#[repr(u32)]
3384#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3385pub enum MavStandardMode {
3386    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3387    MAV_STANDARD_MODE_NON_STANDARD = 0,
3388    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3389    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3390    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3391    MAV_STANDARD_MODE_ORBIT = 2,
3392    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3393    MAV_STANDARD_MODE_CRUISE = 3,
3394    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3395    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3396    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3397    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3398    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3399    MAV_STANDARD_MODE_MISSION = 6,
3400    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3401    MAV_STANDARD_MODE_LAND = 7,
3402    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3403    MAV_STANDARD_MODE_TAKEOFF = 8,
3404}
3405impl MavStandardMode {
3406    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3407}
3408impl Default for MavStandardMode {
3409    fn default() -> Self {
3410        Self::DEFAULT
3411    }
3412}
3413#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3414#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3415#[cfg_attr(feature = "serde", serde(tag = "type"))]
3416#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3417#[repr(u32)]
3418pub enum MavState {
3419    #[doc = "Uninitialized system, state is unknown."]
3420    MAV_STATE_UNINIT = 0,
3421    #[doc = "System is booting up."]
3422    MAV_STATE_BOOT = 1,
3423    #[doc = "System is calibrating and not flight-ready."]
3424    MAV_STATE_CALIBRATING = 2,
3425    #[doc = "System is grounded and on standby. It can be launched any time."]
3426    MAV_STATE_STANDBY = 3,
3427    #[doc = "System is active and might be already airborne. Motors are engaged."]
3428    MAV_STATE_ACTIVE = 4,
3429    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3430    MAV_STATE_CRITICAL = 5,
3431    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3432    MAV_STATE_EMERGENCY = 6,
3433    #[doc = "System just initialized its power-down sequence, will shut down now."]
3434    MAV_STATE_POWEROFF = 7,
3435    #[doc = "System is terminating itself (failsafe or commanded)."]
3436    MAV_STATE_FLIGHT_TERMINATION = 8,
3437}
3438impl MavState {
3439    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3440}
3441impl Default for MavState {
3442    fn default() -> Self {
3443        Self::DEFAULT
3444    }
3445}
3446bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3447impl MavSysStatusSensor {
3448    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3449}
3450impl Default for MavSysStatusSensor {
3451    fn default() -> Self {
3452        Self::DEFAULT
3453    }
3454}
3455bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3456impl MavSysStatusSensorExtended {
3457    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3458}
3459impl Default for MavSysStatusSensorExtended {
3460    fn default() -> Self {
3461        Self::DEFAULT
3462    }
3463}
3464#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3465#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3466#[cfg_attr(feature = "serde", serde(tag = "type"))]
3467#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3468#[repr(u32)]
3469pub enum MavTunnelPayloadType {
3470    #[doc = "Encoding of payload unknown."]
3471    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3472    #[doc = "Registered for STorM32 gimbal controller."]
3473    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3474    #[doc = "Registered for STorM32 gimbal controller."]
3475    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3476    #[doc = "Registered for STorM32 gimbal controller."]
3477    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3478    #[doc = "Registered for STorM32 gimbal controller."]
3479    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3480    #[doc = "Registered for STorM32 gimbal controller."]
3481    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3482    #[doc = "Registered for STorM32 gimbal controller."]
3483    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3484    #[doc = "Registered for STorM32 gimbal controller."]
3485    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3486    #[doc = "Registered for STorM32 gimbal controller."]
3487    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3488    #[doc = "Registered for STorM32 gimbal controller."]
3489    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3490    #[doc = "Registered for STorM32 gimbal controller."]
3491    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3492    #[doc = "Registered for ModalAI remote OSD protocol."]
3493    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3494    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3495    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3496    #[doc = "Registered for ModalAI vendor use."]
3497    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3498}
3499impl MavTunnelPayloadType {
3500    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3501}
3502impl Default for MavTunnelPayloadType {
3503    fn default() -> Self {
3504        Self::DEFAULT
3505    }
3506}
3507#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3508#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3509#[cfg_attr(feature = "serde", serde(tag = "type"))]
3510#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3511#[repr(u32)]
3512#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3513pub enum MavType {
3514    #[doc = "Generic micro air vehicle"]
3515    MAV_TYPE_GENERIC = 0,
3516    #[doc = "Fixed wing aircraft."]
3517    MAV_TYPE_FIXED_WING = 1,
3518    #[doc = "Quadrotor"]
3519    MAV_TYPE_QUADROTOR = 2,
3520    #[doc = "Coaxial helicopter"]
3521    MAV_TYPE_COAXIAL = 3,
3522    #[doc = "Normal helicopter with tail rotor."]
3523    MAV_TYPE_HELICOPTER = 4,
3524    #[doc = "Ground installation"]
3525    MAV_TYPE_ANTENNA_TRACKER = 5,
3526    #[doc = "Operator control unit / ground control station"]
3527    MAV_TYPE_GCS = 6,
3528    #[doc = "Airship, controlled"]
3529    MAV_TYPE_AIRSHIP = 7,
3530    #[doc = "Free balloon, uncontrolled"]
3531    MAV_TYPE_FREE_BALLOON = 8,
3532    #[doc = "Rocket"]
3533    MAV_TYPE_ROCKET = 9,
3534    #[doc = "Ground rover"]
3535    MAV_TYPE_GROUND_ROVER = 10,
3536    #[doc = "Surface vessel, boat, ship"]
3537    MAV_TYPE_SURFACE_BOAT = 11,
3538    #[doc = "Submarine"]
3539    MAV_TYPE_SUBMARINE = 12,
3540    #[doc = "Hexarotor"]
3541    MAV_TYPE_HEXAROTOR = 13,
3542    #[doc = "Octorotor"]
3543    MAV_TYPE_OCTOROTOR = 14,
3544    #[doc = "Tricopter"]
3545    MAV_TYPE_TRICOPTER = 15,
3546    #[doc = "Flapping wing"]
3547    MAV_TYPE_FLAPPING_WING = 16,
3548    #[doc = "Kite"]
3549    MAV_TYPE_KITE = 17,
3550    #[doc = "Onboard companion controller"]
3551    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3552    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3553    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3554    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3555    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3556    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3557    MAV_TYPE_VTOL_TILTROTOR = 21,
3558    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3559    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3560    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3561    MAV_TYPE_VTOL_TAILSITTER = 23,
3562    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3563    MAV_TYPE_VTOL_TILTWING = 24,
3564    #[doc = "VTOL reserved 5"]
3565    MAV_TYPE_VTOL_RESERVED5 = 25,
3566    #[doc = "Gimbal"]
3567    MAV_TYPE_GIMBAL = 26,
3568    #[doc = "ADSB system"]
3569    MAV_TYPE_ADSB = 27,
3570    #[doc = "Steerable, nonrigid airfoil"]
3571    MAV_TYPE_PARAFOIL = 28,
3572    #[doc = "Dodecarotor"]
3573    MAV_TYPE_DODECAROTOR = 29,
3574    #[doc = "Camera"]
3575    MAV_TYPE_CAMERA = 30,
3576    #[doc = "Charging station"]
3577    MAV_TYPE_CHARGING_STATION = 31,
3578    #[doc = "FLARM collision avoidance system"]
3579    MAV_TYPE_FLARM = 32,
3580    #[doc = "Servo"]
3581    MAV_TYPE_SERVO = 33,
3582    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3583    MAV_TYPE_ODID = 34,
3584    #[doc = "Decarotor"]
3585    MAV_TYPE_DECAROTOR = 35,
3586    #[doc = "Battery"]
3587    MAV_TYPE_BATTERY = 36,
3588    #[doc = "Parachute"]
3589    MAV_TYPE_PARACHUTE = 37,
3590    #[doc = "Log"]
3591    MAV_TYPE_LOG = 38,
3592    #[doc = "OSD"]
3593    MAV_TYPE_OSD = 39,
3594    #[doc = "IMU"]
3595    MAV_TYPE_IMU = 40,
3596    #[doc = "GPS"]
3597    MAV_TYPE_GPS = 41,
3598    #[doc = "Winch"]
3599    MAV_TYPE_WINCH = 42,
3600    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3601    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3602    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3603    MAV_TYPE_ILLUMINATOR = 44,
3604    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3605    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3606}
3607impl MavType {
3608    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3609}
3610impl Default for MavType {
3611    fn default() -> Self {
3612        Self::DEFAULT
3613    }
3614}
3615#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3616#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3617#[cfg_attr(feature = "serde", serde(tag = "type"))]
3618#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3619#[repr(u32)]
3620#[doc = "Enumeration of VTOL states"]
3621pub enum MavVtolState {
3622    #[doc = "MAV is not configured as VTOL"]
3623    MAV_VTOL_STATE_UNDEFINED = 0,
3624    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3625    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3626    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3627    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3628    #[doc = "VTOL is in multicopter state"]
3629    MAV_VTOL_STATE_MC = 3,
3630    #[doc = "VTOL is in fixed-wing state"]
3631    MAV_VTOL_STATE_FW = 4,
3632}
3633impl MavVtolState {
3634    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3635}
3636impl Default for MavVtolState {
3637    fn default() -> Self {
3638        Self::DEFAULT
3639    }
3640}
3641bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3642impl MavWinchStatusFlag {
3643    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3644}
3645impl Default for MavWinchStatusFlag {
3646    fn default() -> Self {
3647        Self::DEFAULT
3648    }
3649}
3650#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3651#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3652#[cfg_attr(feature = "serde", serde(tag = "type"))]
3653#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3654#[repr(u32)]
3655pub enum MavlinkDataStreamType {
3656    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3657    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3658    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3659    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3660    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3661    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3662}
3663impl MavlinkDataStreamType {
3664    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3665}
3666impl Default for MavlinkDataStreamType {
3667    fn default() -> Self {
3668        Self::DEFAULT
3669    }
3670}
3671#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3673#[cfg_attr(feature = "serde", serde(tag = "type"))]
3674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3675#[repr(u32)]
3676#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3677pub enum MissionState {
3678    #[doc = "The mission status reporting is not supported."]
3679    MISSION_STATE_UNKNOWN = 0,
3680    #[doc = "No mission on the vehicle."]
3681    MISSION_STATE_NO_MISSION = 1,
3682    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3683    MISSION_STATE_NOT_STARTED = 2,
3684    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3685    MISSION_STATE_ACTIVE = 3,
3686    #[doc = "Mission is paused when in auto mode."]
3687    MISSION_STATE_PAUSED = 4,
3688    #[doc = "Mission has executed all mission items."]
3689    MISSION_STATE_COMPLETE = 5,
3690}
3691impl MissionState {
3692    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3693}
3694impl Default for MissionState {
3695    fn default() -> Self {
3696        Self::DEFAULT
3697    }
3698}
3699#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3701#[cfg_attr(feature = "serde", serde(tag = "type"))]
3702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3703#[repr(u32)]
3704#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3705pub enum MotorTestOrder {
3706    #[doc = "Default autopilot motor test method."]
3707    MOTOR_TEST_ORDER_DEFAULT = 0,
3708    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3709    MOTOR_TEST_ORDER_SEQUENCE = 1,
3710    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3711    MOTOR_TEST_ORDER_BOARD = 2,
3712}
3713impl MotorTestOrder {
3714    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3715}
3716impl Default for MotorTestOrder {
3717    fn default() -> Self {
3718        Self::DEFAULT
3719    }
3720}
3721#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3722#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3723#[cfg_attr(feature = "serde", serde(tag = "type"))]
3724#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3725#[repr(u32)]
3726#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3727pub enum MotorTestThrottleType {
3728    #[doc = "Throttle as a percentage (0 ~ 100)"]
3729    MOTOR_TEST_THROTTLE_PERCENT = 0,
3730    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3731    MOTOR_TEST_THROTTLE_PWM = 1,
3732    #[doc = "Throttle pass-through from pilot's transmitter."]
3733    MOTOR_TEST_THROTTLE_PILOT = 2,
3734    #[doc = "Per-motor compass calibration test."]
3735    MOTOR_TEST_COMPASS_CAL = 3,
3736}
3737impl MotorTestThrottleType {
3738    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3739}
3740impl Default for MotorTestThrottleType {
3741    fn default() -> Self {
3742        Self::DEFAULT
3743    }
3744}
3745#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3746#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3747#[cfg_attr(feature = "serde", serde(tag = "type"))]
3748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3749#[repr(u32)]
3750pub enum NavVtolLandOptions {
3751    #[doc = "Default autopilot landing behaviour."]
3752    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3753    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3754    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3755    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3756    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3757}
3758impl NavVtolLandOptions {
3759    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3760}
3761impl Default for NavVtolLandOptions {
3762    fn default() -> Self {
3763        Self::DEFAULT
3764    }
3765}
3766#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3768#[cfg_attr(feature = "serde", serde(tag = "type"))]
3769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3770#[repr(u32)]
3771#[doc = "Yaw behaviour during orbit flight."]
3772pub enum OrbitYawBehaviour {
3773    #[doc = "Vehicle front points to the center (default)."]
3774    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3775    #[doc = "Vehicle front holds heading when message received."]
3776    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3777    #[doc = "Yaw uncontrolled."]
3778    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3779    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3780    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3781    #[doc = "Yaw controlled by RC input."]
3782    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3783    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3784    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3785}
3786impl OrbitYawBehaviour {
3787    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3788}
3789impl Default for OrbitYawBehaviour {
3790    fn default() -> Self {
3791        Self::DEFAULT
3792    }
3793}
3794#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3796#[cfg_attr(feature = "serde", serde(tag = "type"))]
3797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3798#[repr(u32)]
3799#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3800pub enum ParachuteAction {
3801    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3802    PARACHUTE_DISABLE = 0,
3803    #[doc = "Enable auto-release of parachute."]
3804    PARACHUTE_ENABLE = 1,
3805    #[doc = "Release parachute and kill motors."]
3806    PARACHUTE_RELEASE = 2,
3807}
3808impl ParachuteAction {
3809    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3810}
3811impl Default for ParachuteAction {
3812    fn default() -> Self {
3813        Self::DEFAULT
3814    }
3815}
3816#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3817#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3818#[cfg_attr(feature = "serde", serde(tag = "type"))]
3819#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3820#[repr(u32)]
3821#[doc = "Result from PARAM_EXT_SET message."]
3822pub enum ParamAck {
3823    #[doc = "Parameter value ACCEPTED and SET"]
3824    PARAM_ACK_ACCEPTED = 0,
3825    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3826    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3827    #[doc = "Parameter failed to set"]
3828    PARAM_ACK_FAILED = 2,
3829    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3830    PARAM_ACK_IN_PROGRESS = 3,
3831}
3832impl ParamAck {
3833    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3834}
3835impl Default for ParamAck {
3836    fn default() -> Self {
3837        Self::DEFAULT
3838    }
3839}
3840bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3841impl PositionTargetTypemask {
3842    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
3843}
3844impl Default for PositionTargetTypemask {
3845    fn default() -> Self {
3846        Self::DEFAULT
3847    }
3848}
3849#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3850#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3851#[cfg_attr(feature = "serde", serde(tag = "type"))]
3852#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3853#[repr(u32)]
3854#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
3855pub enum PrecisionLandMode {
3856    #[doc = "Normal (non-precision) landing."]
3857    PRECISION_LAND_MODE_DISABLED = 0,
3858    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
3859    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
3860    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
3861    PRECISION_LAND_MODE_REQUIRED = 2,
3862}
3863impl PrecisionLandMode {
3864    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
3865}
3866impl Default for PrecisionLandMode {
3867    fn default() -> Self {
3868        Self::DEFAULT
3869    }
3870}
3871#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3873#[cfg_attr(feature = "serde", serde(tag = "type"))]
3874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3875#[repr(u32)]
3876#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
3877pub enum PreflightStorageMissionAction {
3878    #[doc = "Read current mission data from persistent storage"]
3879    MISSION_READ_PERSISTENT = 0,
3880    #[doc = "Write current mission data to persistent storage"]
3881    MISSION_WRITE_PERSISTENT = 1,
3882    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
3883    MISSION_RESET_DEFAULT = 2,
3884}
3885impl PreflightStorageMissionAction {
3886    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
3887}
3888impl Default for PreflightStorageMissionAction {
3889    fn default() -> Self {
3890        Self::DEFAULT
3891    }
3892}
3893#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3894#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3895#[cfg_attr(feature = "serde", serde(tag = "type"))]
3896#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3897#[repr(u32)]
3898#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
3899pub enum PreflightStorageParameterAction {
3900    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
3901    PARAM_READ_PERSISTENT = 0,
3902    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
3903    PARAM_WRITE_PERSISTENT = 1,
3904    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
3905    PARAM_RESET_CONFIG_DEFAULT = 2,
3906    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
3907    PARAM_RESET_SENSOR_DEFAULT = 3,
3908    #[doc = "Reset all parameters, including operation counters, to default values"]
3909    PARAM_RESET_ALL_DEFAULT = 4,
3910}
3911impl PreflightStorageParameterAction {
3912    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
3913}
3914impl Default for PreflightStorageParameterAction {
3915    fn default() -> Self {
3916        Self::DEFAULT
3917    }
3918}
3919#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3921#[cfg_attr(feature = "serde", serde(tag = "type"))]
3922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3923#[repr(u32)]
3924#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
3925pub enum RcSubType {
3926    #[doc = "Spektrum DSM2"]
3927    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
3928    #[doc = "Spektrum DSMX"]
3929    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
3930    #[doc = "Spektrum DSMX8"]
3931    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
3932}
3933impl RcSubType {
3934    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
3935}
3936impl Default for RcSubType {
3937    fn default() -> Self {
3938        Self::DEFAULT
3939    }
3940}
3941#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3942#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3943#[cfg_attr(feature = "serde", serde(tag = "type"))]
3944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3945#[repr(u32)]
3946#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
3947pub enum RcType {
3948    #[doc = "Spektrum"]
3949    RC_TYPE_SPEKTRUM = 0,
3950    #[doc = "CRSF"]
3951    RC_TYPE_CRSF = 1,
3952}
3953impl RcType {
3954    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
3955}
3956impl Default for RcType {
3957    fn default() -> Self {
3958        Self::DEFAULT
3959    }
3960}
3961#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3962#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3963#[cfg_attr(feature = "serde", serde(tag = "type"))]
3964#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3965#[repr(u32)]
3966#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
3967pub enum RebootShutdownConditions {
3968    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
3969    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
3970    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
3971    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
3972}
3973impl RebootShutdownConditions {
3974    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
3975}
3976impl Default for RebootShutdownConditions {
3977    fn default() -> Self {
3978        Self::DEFAULT
3979    }
3980}
3981#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3982#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3983#[cfg_attr(feature = "serde", serde(tag = "type"))]
3984#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3985#[repr(u32)]
3986#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
3987pub enum RtkBaselineCoordinateSystem {
3988    #[doc = "Earth-centered, Earth-fixed"]
3989    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
3990    #[doc = "RTK basestation centered, north, east, down"]
3991    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
3992}
3993impl RtkBaselineCoordinateSystem {
3994    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
3995}
3996impl Default for RtkBaselineCoordinateSystem {
3997    fn default() -> Self {
3998        Self::DEFAULT
3999    }
4000}
4001#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4002#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4003#[cfg_attr(feature = "serde", serde(tag = "type"))]
4004#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4005#[repr(u32)]
4006#[doc = "Possible safety switch states."]
4007pub enum SafetySwitchState {
4008    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4009    SAFETY_SWITCH_STATE_SAFE = 0,
4010    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4011    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4012}
4013impl SafetySwitchState {
4014    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4015}
4016impl Default for SafetySwitchState {
4017    fn default() -> Self {
4018        Self::DEFAULT
4019    }
4020}
4021#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4022#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4023#[cfg_attr(feature = "serde", serde(tag = "type"))]
4024#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4025#[repr(u32)]
4026#[doc = "SERIAL_CONTROL device types"]
4027pub enum SerialControlDev {
4028    #[doc = "First telemetry port"]
4029    SERIAL_CONTROL_DEV_TELEM1 = 0,
4030    #[doc = "Second telemetry port"]
4031    SERIAL_CONTROL_DEV_TELEM2 = 1,
4032    #[doc = "First GPS port"]
4033    SERIAL_CONTROL_DEV_GPS1 = 2,
4034    #[doc = "Second GPS port"]
4035    SERIAL_CONTROL_DEV_GPS2 = 3,
4036    #[doc = "system shell"]
4037    SERIAL_CONTROL_DEV_SHELL = 10,
4038    #[doc = "SERIAL0"]
4039    SERIAL_CONTROL_SERIAL0 = 100,
4040    #[doc = "SERIAL1"]
4041    SERIAL_CONTROL_SERIAL1 = 101,
4042    #[doc = "SERIAL2"]
4043    SERIAL_CONTROL_SERIAL2 = 102,
4044    #[doc = "SERIAL3"]
4045    SERIAL_CONTROL_SERIAL3 = 103,
4046    #[doc = "SERIAL4"]
4047    SERIAL_CONTROL_SERIAL4 = 104,
4048    #[doc = "SERIAL5"]
4049    SERIAL_CONTROL_SERIAL5 = 105,
4050    #[doc = "SERIAL6"]
4051    SERIAL_CONTROL_SERIAL6 = 106,
4052    #[doc = "SERIAL7"]
4053    SERIAL_CONTROL_SERIAL7 = 107,
4054    #[doc = "SERIAL8"]
4055    SERIAL_CONTROL_SERIAL8 = 108,
4056    #[doc = "SERIAL9"]
4057    SERIAL_CONTROL_SERIAL9 = 109,
4058}
4059impl SerialControlDev {
4060    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4061}
4062impl Default for SerialControlDev {
4063    fn default() -> Self {
4064        Self::DEFAULT
4065    }
4066}
4067bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4068impl SerialControlFlag {
4069    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4070}
4071impl Default for SerialControlFlag {
4072    fn default() -> Self {
4073        Self::DEFAULT
4074    }
4075}
4076#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4078#[cfg_attr(feature = "serde", serde(tag = "type"))]
4079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4080#[repr(u32)]
4081#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4082pub enum SetFocusType {
4083    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4084    FOCUS_TYPE_STEP = 0,
4085    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4086    FOCUS_TYPE_CONTINUOUS = 1,
4087    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4088    FOCUS_TYPE_RANGE = 2,
4089    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4090    FOCUS_TYPE_METERS = 3,
4091    #[doc = "Focus automatically."]
4092    FOCUS_TYPE_AUTO = 4,
4093    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4094    FOCUS_TYPE_AUTO_SINGLE = 5,
4095    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4096    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4097}
4098impl SetFocusType {
4099    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4100}
4101impl Default for SetFocusType {
4102    fn default() -> Self {
4103        Self::DEFAULT
4104    }
4105}
4106#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4107#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4108#[cfg_attr(feature = "serde", serde(tag = "type"))]
4109#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4110#[repr(u32)]
4111#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4112pub enum SpeedType {
4113    #[doc = "Airspeed"]
4114    SPEED_TYPE_AIRSPEED = 0,
4115    #[doc = "Groundspeed"]
4116    SPEED_TYPE_GROUNDSPEED = 1,
4117    #[doc = "Climb speed"]
4118    SPEED_TYPE_CLIMB_SPEED = 2,
4119    #[doc = "Descent speed"]
4120    SPEED_TYPE_DESCENT_SPEED = 3,
4121}
4122impl SpeedType {
4123    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4124}
4125impl Default for SpeedType {
4126    fn default() -> Self {
4127        Self::DEFAULT
4128    }
4129}
4130#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4131#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4132#[cfg_attr(feature = "serde", serde(tag = "type"))]
4133#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4134#[repr(u32)]
4135#[doc = "Flags to indicate the status of camera storage."]
4136pub enum StorageStatus {
4137    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4138    STORAGE_STATUS_EMPTY = 0,
4139    #[doc = "Storage present but unformatted."]
4140    STORAGE_STATUS_UNFORMATTED = 1,
4141    #[doc = "Storage present and ready."]
4142    STORAGE_STATUS_READY = 2,
4143    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4144    STORAGE_STATUS_NOT_SUPPORTED = 3,
4145}
4146impl StorageStatus {
4147    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4148}
4149impl Default for StorageStatus {
4150    fn default() -> Self {
4151        Self::DEFAULT
4152    }
4153}
4154#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4156#[cfg_attr(feature = "serde", serde(tag = "type"))]
4157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4158#[repr(u32)]
4159#[doc = "Flags to indicate the type of storage."]
4160pub enum StorageType {
4161    #[doc = "Storage type is not known."]
4162    STORAGE_TYPE_UNKNOWN = 0,
4163    #[doc = "Storage type is USB device."]
4164    STORAGE_TYPE_USB_STICK = 1,
4165    #[doc = "Storage type is SD card."]
4166    STORAGE_TYPE_SD = 2,
4167    #[doc = "Storage type is microSD card."]
4168    STORAGE_TYPE_MICROSD = 3,
4169    #[doc = "Storage type is CFast."]
4170    STORAGE_TYPE_CF = 4,
4171    #[doc = "Storage type is CFexpress."]
4172    STORAGE_TYPE_CFE = 5,
4173    #[doc = "Storage type is XQD."]
4174    STORAGE_TYPE_XQD = 6,
4175    #[doc = "Storage type is HD mass storage type."]
4176    STORAGE_TYPE_HD = 7,
4177    #[doc = "Storage type is other, not listed type."]
4178    STORAGE_TYPE_OTHER = 254,
4179}
4180impl StorageType {
4181    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4182}
4183impl Default for StorageType {
4184    fn default() -> Self {
4185        Self::DEFAULT
4186    }
4187}
4188bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4189impl StorageUsageFlag {
4190    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4191}
4192impl Default for StorageUsageFlag {
4193    fn default() -> Self {
4194        Self::DEFAULT
4195    }
4196}
4197#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4199#[cfg_attr(feature = "serde", serde(tag = "type"))]
4200#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4201#[repr(u32)]
4202#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4203pub enum TuneFormat {
4204    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4205    TUNE_FORMAT_QBASIC1_1 = 1,
4206    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4207    TUNE_FORMAT_MML_MODERN = 2,
4208}
4209impl TuneFormat {
4210    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4211}
4212impl Default for TuneFormat {
4213    fn default() -> Self {
4214        Self::DEFAULT
4215    }
4216}
4217#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4219#[cfg_attr(feature = "serde", serde(tag = "type"))]
4220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4221#[repr(u32)]
4222#[doc = "Generalized UAVCAN node health"]
4223pub enum UavcanNodeHealth {
4224    #[doc = "The node is functioning properly."]
4225    UAVCAN_NODE_HEALTH_OK = 0,
4226    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4227    UAVCAN_NODE_HEALTH_WARNING = 1,
4228    #[doc = "The node has encountered a major failure."]
4229    UAVCAN_NODE_HEALTH_ERROR = 2,
4230    #[doc = "The node has suffered a fatal malfunction."]
4231    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4232}
4233impl UavcanNodeHealth {
4234    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4235}
4236impl Default for UavcanNodeHealth {
4237    fn default() -> Self {
4238        Self::DEFAULT
4239    }
4240}
4241#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4242#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4243#[cfg_attr(feature = "serde", serde(tag = "type"))]
4244#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4245#[repr(u32)]
4246#[doc = "Generalized UAVCAN node mode"]
4247pub enum UavcanNodeMode {
4248    #[doc = "The node is performing its primary functions."]
4249    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4250    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4251    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4252    #[doc = "The node is under maintenance."]
4253    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4254    #[doc = "The node is in the process of updating its software."]
4255    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4256    #[doc = "The node is no longer available online."]
4257    UAVCAN_NODE_MODE_OFFLINE = 7,
4258}
4259impl UavcanNodeMode {
4260    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4261}
4262impl Default for UavcanNodeMode {
4263    fn default() -> Self {
4264        Self::DEFAULT
4265    }
4266}
4267bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4268impl UtmDataAvailFlags {
4269    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4270}
4271impl Default for UtmDataAvailFlags {
4272    fn default() -> Self {
4273        Self::DEFAULT
4274    }
4275}
4276#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4277#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4278#[cfg_attr(feature = "serde", serde(tag = "type"))]
4279#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4280#[repr(u32)]
4281#[doc = "Airborne status of UAS."]
4282pub enum UtmFlightState {
4283    #[doc = "The flight state can't be determined."]
4284    UTM_FLIGHT_STATE_UNKNOWN = 1,
4285    #[doc = "UAS on ground."]
4286    UTM_FLIGHT_STATE_GROUND = 2,
4287    #[doc = "UAS airborne."]
4288    UTM_FLIGHT_STATE_AIRBORNE = 3,
4289    #[doc = "UAS is in an emergency flight state."]
4290    UTM_FLIGHT_STATE_EMERGENCY = 16,
4291    #[doc = "UAS has no active controls."]
4292    UTM_FLIGHT_STATE_NOCTRL = 32,
4293}
4294impl UtmFlightState {
4295    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4296}
4297impl Default for UtmFlightState {
4298    fn default() -> Self {
4299        Self::DEFAULT
4300    }
4301}
4302#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4303#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4304#[cfg_attr(feature = "serde", serde(tag = "type"))]
4305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4306#[repr(u32)]
4307#[doc = "Video stream encodings"]
4308pub enum VideoStreamEncoding {
4309    #[doc = "Stream encoding is unknown"]
4310    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4311    #[doc = "Stream encoding is H.264"]
4312    VIDEO_STREAM_ENCODING_H264 = 1,
4313    #[doc = "Stream encoding is H.265"]
4314    VIDEO_STREAM_ENCODING_H265 = 2,
4315}
4316impl VideoStreamEncoding {
4317    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4318}
4319impl Default for VideoStreamEncoding {
4320    fn default() -> Self {
4321        Self::DEFAULT
4322    }
4323}
4324bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4325impl VideoStreamStatusFlags {
4326    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4327}
4328impl Default for VideoStreamStatusFlags {
4329    fn default() -> Self {
4330        Self::DEFAULT
4331    }
4332}
4333#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4335#[cfg_attr(feature = "serde", serde(tag = "type"))]
4336#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4337#[repr(u32)]
4338#[doc = "Video stream types"]
4339pub enum VideoStreamType {
4340    #[doc = "Stream is RTSP"]
4341    VIDEO_STREAM_TYPE_RTSP = 0,
4342    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4343    VIDEO_STREAM_TYPE_RTPUDP = 1,
4344    #[doc = "Stream is MPEG on TCP"]
4345    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4346    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4347    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4348}
4349impl VideoStreamType {
4350    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4351}
4352impl Default for VideoStreamType {
4353    fn default() -> Self {
4354        Self::DEFAULT
4355    }
4356}
4357#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4358#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4359#[cfg_attr(feature = "serde", serde(tag = "type"))]
4360#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4361#[repr(u32)]
4362#[doc = "Direction of VTOL transition"]
4363pub enum VtolTransitionHeading {
4364    #[doc = "Respect the heading configuration of the vehicle."]
4365    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4366    #[doc = "Use the heading pointing towards the next waypoint."]
4367    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4368    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4369    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4370    #[doc = "Use the specified heading in parameter 4."]
4371    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4372    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4373    VTOL_TRANSITION_HEADING_ANY = 4,
4374}
4375impl VtolTransitionHeading {
4376    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4377}
4378impl Default for VtolTransitionHeading {
4379    fn default() -> Self {
4380        Self::DEFAULT
4381    }
4382}
4383#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4385#[cfg_attr(feature = "serde", serde(tag = "type"))]
4386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4387#[repr(u32)]
4388#[doc = "WiFi Mode."]
4389pub enum WifiConfigApMode {
4390    #[doc = "WiFi mode is undefined."]
4391    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4392    #[doc = "WiFi configured as an access point."]
4393    WIFI_CONFIG_AP_MODE_AP = 1,
4394    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4395    WIFI_CONFIG_AP_MODE_STATION = 2,
4396    #[doc = "WiFi disabled."]
4397    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4398}
4399impl WifiConfigApMode {
4400    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4401}
4402impl Default for WifiConfigApMode {
4403    fn default() -> Self {
4404        Self::DEFAULT
4405    }
4406}
4407#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4408#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4409#[cfg_attr(feature = "serde", serde(tag = "type"))]
4410#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4411#[repr(u32)]
4412#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4413pub enum WifiConfigApResponse {
4414    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4415    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4416    #[doc = "Changes accepted."]
4417    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4418    #[doc = "Changes rejected."]
4419    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4420    #[doc = "Invalid Mode."]
4421    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4422    #[doc = "Invalid SSID."]
4423    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4424    #[doc = "Invalid Password."]
4425    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4426}
4427impl WifiConfigApResponse {
4428    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4429}
4430impl Default for WifiConfigApResponse {
4431    fn default() -> Self {
4432        Self::DEFAULT
4433    }
4434}
4435#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4436#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4437#[cfg_attr(feature = "serde", serde(tag = "type"))]
4438#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4439#[repr(u32)]
4440#[doc = "Winch actions."]
4441pub enum WinchActions {
4442    #[doc = "Allow motor to freewheel."]
4443    WINCH_RELAXED = 0,
4444    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4445    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4446    #[doc = "Wind or unwind line at specified rate."]
4447    WINCH_RATE_CONTROL = 2,
4448    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4449    WINCH_LOCK = 3,
4450    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4451    WINCH_DELIVER = 4,
4452    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4453    WINCH_HOLD = 5,
4454    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4455    WINCH_RETRACT = 6,
4456    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4457    WINCH_LOAD_LINE = 7,
4458    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4459    WINCH_ABANDON_LINE = 8,
4460    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4461    WINCH_LOAD_PAYLOAD = 9,
4462}
4463impl WinchActions {
4464    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4465}
4466impl Default for WinchActions {
4467    fn default() -> Self {
4468        Self::DEFAULT
4469    }
4470}
4471#[doc = "id: 140"]
4472#[doc = "Set the vehicle attitude and body angular rates."]
4473#[derive(Debug, Clone, PartialEq)]
4474#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4476pub struct ACTUATOR_CONTROL_TARGET_DATA {
4477    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4478    pub time_usec: u64,
4479    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4480    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4481    pub controls: [f32; 8],
4482    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4483    pub group_mlx: u8,
4484}
4485impl ACTUATOR_CONTROL_TARGET_DATA {
4486    pub const ENCODED_LEN: usize = 41usize;
4487    pub const DEFAULT: Self = Self {
4488        time_usec: 0_u64,
4489        controls: [0.0_f32; 8usize],
4490        group_mlx: 0_u8,
4491    };
4492    #[cfg(feature = "arbitrary")]
4493    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4494        use arbitrary::{Arbitrary, Unstructured};
4495        let mut buf = [0u8; 1024];
4496        rng.fill_bytes(&mut buf);
4497        let mut unstructured = Unstructured::new(&buf);
4498        Self::arbitrary(&mut unstructured).unwrap_or_default()
4499    }
4500}
4501impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4502    fn default() -> Self {
4503        Self::DEFAULT.clone()
4504    }
4505}
4506impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4507    type Message = MavMessage;
4508    const ID: u32 = 140u32;
4509    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4510    const EXTRA_CRC: u8 = 181u8;
4511    const ENCODED_LEN: usize = 41usize;
4512    fn deser(
4513        _version: MavlinkVersion,
4514        __input: &[u8],
4515    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4516        let avail_len = __input.len();
4517        let mut payload_buf = [0; Self::ENCODED_LEN];
4518        let mut buf = if avail_len < Self::ENCODED_LEN {
4519            payload_buf[0..avail_len].copy_from_slice(__input);
4520            Bytes::new(&payload_buf)
4521        } else {
4522            Bytes::new(__input)
4523        };
4524        let mut __struct = Self::default();
4525        __struct.time_usec = buf.get_u64_le();
4526        for v in &mut __struct.controls {
4527            let val = buf.get_f32_le();
4528            *v = val;
4529        }
4530        __struct.group_mlx = buf.get_u8();
4531        Ok(__struct)
4532    }
4533    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4534        let mut __tmp = BytesMut::new(bytes);
4535        #[allow(clippy::absurd_extreme_comparisons)]
4536        #[allow(unused_comparisons)]
4537        if __tmp.remaining() < Self::ENCODED_LEN {
4538            panic!(
4539                "buffer is too small (need {} bytes, but got {})",
4540                Self::ENCODED_LEN,
4541                __tmp.remaining(),
4542            )
4543        }
4544        __tmp.put_u64_le(self.time_usec);
4545        for val in &self.controls {
4546            __tmp.put_f32_le(*val);
4547        }
4548        __tmp.put_u8(self.group_mlx);
4549        if matches!(version, MavlinkVersion::V2) {
4550            let len = __tmp.len();
4551            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4552        } else {
4553            __tmp.len()
4554        }
4555    }
4556}
4557#[doc = "id: 375"]
4558#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4559#[derive(Debug, Clone, PartialEq)]
4560#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4561#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4562pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4563    #[doc = "Timestamp (since system boot)."]
4564    pub time_usec: u64,
4565    #[doc = "Active outputs"]
4566    pub active: u32,
4567    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4568    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4569    pub actuator: [f32; 32],
4570}
4571impl ACTUATOR_OUTPUT_STATUS_DATA {
4572    pub const ENCODED_LEN: usize = 140usize;
4573    pub const DEFAULT: Self = Self {
4574        time_usec: 0_u64,
4575        active: 0_u32,
4576        actuator: [0.0_f32; 32usize],
4577    };
4578    #[cfg(feature = "arbitrary")]
4579    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4580        use arbitrary::{Arbitrary, Unstructured};
4581        let mut buf = [0u8; 1024];
4582        rng.fill_bytes(&mut buf);
4583        let mut unstructured = Unstructured::new(&buf);
4584        Self::arbitrary(&mut unstructured).unwrap_or_default()
4585    }
4586}
4587impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4588    fn default() -> Self {
4589        Self::DEFAULT.clone()
4590    }
4591}
4592impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4593    type Message = MavMessage;
4594    const ID: u32 = 375u32;
4595    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4596    const EXTRA_CRC: u8 = 251u8;
4597    const ENCODED_LEN: usize = 140usize;
4598    fn deser(
4599        _version: MavlinkVersion,
4600        __input: &[u8],
4601    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4602        let avail_len = __input.len();
4603        let mut payload_buf = [0; Self::ENCODED_LEN];
4604        let mut buf = if avail_len < Self::ENCODED_LEN {
4605            payload_buf[0..avail_len].copy_from_slice(__input);
4606            Bytes::new(&payload_buf)
4607        } else {
4608            Bytes::new(__input)
4609        };
4610        let mut __struct = Self::default();
4611        __struct.time_usec = buf.get_u64_le();
4612        __struct.active = buf.get_u32_le();
4613        for v in &mut __struct.actuator {
4614            let val = buf.get_f32_le();
4615            *v = val;
4616        }
4617        Ok(__struct)
4618    }
4619    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4620        let mut __tmp = BytesMut::new(bytes);
4621        #[allow(clippy::absurd_extreme_comparisons)]
4622        #[allow(unused_comparisons)]
4623        if __tmp.remaining() < Self::ENCODED_LEN {
4624            panic!(
4625                "buffer is too small (need {} bytes, but got {})",
4626                Self::ENCODED_LEN,
4627                __tmp.remaining(),
4628            )
4629        }
4630        __tmp.put_u64_le(self.time_usec);
4631        __tmp.put_u32_le(self.active);
4632        for val in &self.actuator {
4633            __tmp.put_f32_le(*val);
4634        }
4635        if matches!(version, MavlinkVersion::V2) {
4636            let len = __tmp.len();
4637            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4638        } else {
4639            __tmp.len()
4640        }
4641    }
4642}
4643#[doc = "id: 246"]
4644#[doc = "The location and information of an ADSB vehicle."]
4645#[derive(Debug, Clone, PartialEq)]
4646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4647#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4648pub struct ADSB_VEHICLE_DATA {
4649    #[doc = "ICAO address"]
4650    pub ICAO_address: u32,
4651    #[doc = "Latitude"]
4652    pub lat: i32,
4653    #[doc = "Longitude"]
4654    pub lon: i32,
4655    #[doc = "Altitude(ASL)"]
4656    pub altitude: i32,
4657    #[doc = "Course over ground"]
4658    pub heading: u16,
4659    #[doc = "The horizontal velocity"]
4660    pub hor_velocity: u16,
4661    #[doc = "The vertical velocity. Positive is up"]
4662    pub ver_velocity: i16,
4663    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4664    pub flags: AdsbFlags,
4665    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4666    pub squawk: u16,
4667    #[doc = "ADSB altitude type."]
4668    pub altitude_type: AdsbAltitudeType,
4669    #[doc = "The callsign, 8+null"]
4670    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4671    pub callsign: [u8; 9],
4672    #[doc = "ADSB emitter type."]
4673    pub emitter_type: AdsbEmitterType,
4674    #[doc = "Time since last communication in seconds"]
4675    pub tslc: u8,
4676}
4677impl ADSB_VEHICLE_DATA {
4678    pub const ENCODED_LEN: usize = 38usize;
4679    pub const DEFAULT: Self = Self {
4680        ICAO_address: 0_u32,
4681        lat: 0_i32,
4682        lon: 0_i32,
4683        altitude: 0_i32,
4684        heading: 0_u16,
4685        hor_velocity: 0_u16,
4686        ver_velocity: 0_i16,
4687        flags: AdsbFlags::DEFAULT,
4688        squawk: 0_u16,
4689        altitude_type: AdsbAltitudeType::DEFAULT,
4690        callsign: [0_u8; 9usize],
4691        emitter_type: AdsbEmitterType::DEFAULT,
4692        tslc: 0_u8,
4693    };
4694    #[cfg(feature = "arbitrary")]
4695    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4696        use arbitrary::{Arbitrary, Unstructured};
4697        let mut buf = [0u8; 1024];
4698        rng.fill_bytes(&mut buf);
4699        let mut unstructured = Unstructured::new(&buf);
4700        Self::arbitrary(&mut unstructured).unwrap_or_default()
4701    }
4702}
4703impl Default for ADSB_VEHICLE_DATA {
4704    fn default() -> Self {
4705        Self::DEFAULT.clone()
4706    }
4707}
4708impl MessageData for ADSB_VEHICLE_DATA {
4709    type Message = MavMessage;
4710    const ID: u32 = 246u32;
4711    const NAME: &'static str = "ADSB_VEHICLE";
4712    const EXTRA_CRC: u8 = 184u8;
4713    const ENCODED_LEN: usize = 38usize;
4714    fn deser(
4715        _version: MavlinkVersion,
4716        __input: &[u8],
4717    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4718        let avail_len = __input.len();
4719        let mut payload_buf = [0; Self::ENCODED_LEN];
4720        let mut buf = if avail_len < Self::ENCODED_LEN {
4721            payload_buf[0..avail_len].copy_from_slice(__input);
4722            Bytes::new(&payload_buf)
4723        } else {
4724            Bytes::new(__input)
4725        };
4726        let mut __struct = Self::default();
4727        __struct.ICAO_address = buf.get_u32_le();
4728        __struct.lat = buf.get_i32_le();
4729        __struct.lon = buf.get_i32_le();
4730        __struct.altitude = buf.get_i32_le();
4731        __struct.heading = buf.get_u16_le();
4732        __struct.hor_velocity = buf.get_u16_le();
4733        __struct.ver_velocity = buf.get_i16_le();
4734        let tmp = buf.get_u16_le();
4735        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
4736            ::mavlink_core::error::ParserError::InvalidFlag {
4737                flag_type: "AdsbFlags",
4738                value: tmp as u32,
4739            },
4740        )?;
4741        __struct.squawk = buf.get_u16_le();
4742        let tmp = buf.get_u8();
4743        __struct.altitude_type =
4744            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4745                enum_type: "AdsbAltitudeType",
4746                value: tmp as u32,
4747            })?;
4748        for v in &mut __struct.callsign {
4749            let val = buf.get_u8();
4750            *v = val;
4751        }
4752        let tmp = buf.get_u8();
4753        __struct.emitter_type =
4754            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4755                enum_type: "AdsbEmitterType",
4756                value: tmp as u32,
4757            })?;
4758        __struct.tslc = buf.get_u8();
4759        Ok(__struct)
4760    }
4761    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4762        let mut __tmp = BytesMut::new(bytes);
4763        #[allow(clippy::absurd_extreme_comparisons)]
4764        #[allow(unused_comparisons)]
4765        if __tmp.remaining() < Self::ENCODED_LEN {
4766            panic!(
4767                "buffer is too small (need {} bytes, but got {})",
4768                Self::ENCODED_LEN,
4769                __tmp.remaining(),
4770            )
4771        }
4772        __tmp.put_u32_le(self.ICAO_address);
4773        __tmp.put_i32_le(self.lat);
4774        __tmp.put_i32_le(self.lon);
4775        __tmp.put_i32_le(self.altitude);
4776        __tmp.put_u16_le(self.heading);
4777        __tmp.put_u16_le(self.hor_velocity);
4778        __tmp.put_i16_le(self.ver_velocity);
4779        __tmp.put_u16_le(self.flags.bits());
4780        __tmp.put_u16_le(self.squawk);
4781        __tmp.put_u8(self.altitude_type as u8);
4782        for val in &self.callsign {
4783            __tmp.put_u8(*val);
4784        }
4785        __tmp.put_u8(self.emitter_type as u8);
4786        __tmp.put_u8(self.tslc);
4787        if matches!(version, MavlinkVersion::V2) {
4788            let len = __tmp.len();
4789            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4790        } else {
4791            __tmp.len()
4792        }
4793    }
4794}
4795#[doc = "id: 182"]
4796#[doc = "The airspeed measured by sensors and IMU."]
4797#[derive(Debug, Clone, PartialEq)]
4798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4800pub struct AIRSPEEDS_DATA {
4801    #[doc = "Timestamp (milliseconds since system boot)"]
4802    pub time_boot_ms: u32,
4803    #[doc = "Airspeed estimate from IMU, cm/s"]
4804    pub airspeed_imu: i16,
4805    #[doc = "Pitot measured forward airpseed, cm/s"]
4806    pub airspeed_pitot: i16,
4807    #[doc = "Hot wire anenometer measured airspeed, cm/s"]
4808    pub airspeed_hot_wire: i16,
4809    #[doc = "Ultrasonic measured airspeed, cm/s"]
4810    pub airspeed_ultrasonic: i16,
4811    #[doc = "Angle of attack sensor, degrees * 10"]
4812    pub aoa: i16,
4813    #[doc = "Yaw angle sensor, degrees * 10"]
4814    pub aoy: i16,
4815}
4816impl AIRSPEEDS_DATA {
4817    pub const ENCODED_LEN: usize = 16usize;
4818    pub const DEFAULT: Self = Self {
4819        time_boot_ms: 0_u32,
4820        airspeed_imu: 0_i16,
4821        airspeed_pitot: 0_i16,
4822        airspeed_hot_wire: 0_i16,
4823        airspeed_ultrasonic: 0_i16,
4824        aoa: 0_i16,
4825        aoy: 0_i16,
4826    };
4827    #[cfg(feature = "arbitrary")]
4828    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4829        use arbitrary::{Arbitrary, Unstructured};
4830        let mut buf = [0u8; 1024];
4831        rng.fill_bytes(&mut buf);
4832        let mut unstructured = Unstructured::new(&buf);
4833        Self::arbitrary(&mut unstructured).unwrap_or_default()
4834    }
4835}
4836impl Default for AIRSPEEDS_DATA {
4837    fn default() -> Self {
4838        Self::DEFAULT.clone()
4839    }
4840}
4841impl MessageData for AIRSPEEDS_DATA {
4842    type Message = MavMessage;
4843    const ID: u32 = 182u32;
4844    const NAME: &'static str = "AIRSPEEDS";
4845    const EXTRA_CRC: u8 = 154u8;
4846    const ENCODED_LEN: usize = 16usize;
4847    fn deser(
4848        _version: MavlinkVersion,
4849        __input: &[u8],
4850    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4851        let avail_len = __input.len();
4852        let mut payload_buf = [0; Self::ENCODED_LEN];
4853        let mut buf = if avail_len < Self::ENCODED_LEN {
4854            payload_buf[0..avail_len].copy_from_slice(__input);
4855            Bytes::new(&payload_buf)
4856        } else {
4857            Bytes::new(__input)
4858        };
4859        let mut __struct = Self::default();
4860        __struct.time_boot_ms = buf.get_u32_le();
4861        __struct.airspeed_imu = buf.get_i16_le();
4862        __struct.airspeed_pitot = buf.get_i16_le();
4863        __struct.airspeed_hot_wire = buf.get_i16_le();
4864        __struct.airspeed_ultrasonic = buf.get_i16_le();
4865        __struct.aoa = buf.get_i16_le();
4866        __struct.aoy = buf.get_i16_le();
4867        Ok(__struct)
4868    }
4869    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4870        let mut __tmp = BytesMut::new(bytes);
4871        #[allow(clippy::absurd_extreme_comparisons)]
4872        #[allow(unused_comparisons)]
4873        if __tmp.remaining() < Self::ENCODED_LEN {
4874            panic!(
4875                "buffer is too small (need {} bytes, but got {})",
4876                Self::ENCODED_LEN,
4877                __tmp.remaining(),
4878            )
4879        }
4880        __tmp.put_u32_le(self.time_boot_ms);
4881        __tmp.put_i16_le(self.airspeed_imu);
4882        __tmp.put_i16_le(self.airspeed_pitot);
4883        __tmp.put_i16_le(self.airspeed_hot_wire);
4884        __tmp.put_i16_le(self.airspeed_ultrasonic);
4885        __tmp.put_i16_le(self.aoa);
4886        __tmp.put_i16_le(self.aoy);
4887        if matches!(version, MavlinkVersion::V2) {
4888            let len = __tmp.len();
4889            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4890        } else {
4891            __tmp.len()
4892        }
4893    }
4894}
4895#[doc = "id: 301"]
4896#[doc = "The location and information of an AIS vessel."]
4897#[derive(Debug, Clone, PartialEq)]
4898#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4899#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4900pub struct AIS_VESSEL_DATA {
4901    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
4902    pub MMSI: u32,
4903    #[doc = "Latitude"]
4904    pub lat: i32,
4905    #[doc = "Longitude"]
4906    pub lon: i32,
4907    #[doc = "Course over ground"]
4908    pub COG: u16,
4909    #[doc = "True heading"]
4910    pub heading: u16,
4911    #[doc = "Speed over ground"]
4912    pub velocity: u16,
4913    #[doc = "Distance from lat/lon location to bow"]
4914    pub dimension_bow: u16,
4915    #[doc = "Distance from lat/lon location to stern"]
4916    pub dimension_stern: u16,
4917    #[doc = "Time since last communication in seconds"]
4918    pub tslc: u16,
4919    #[doc = "Bitmask to indicate various statuses including valid data fields"]
4920    pub flags: AisFlags,
4921    #[doc = "Turn rate"]
4922    pub turn_rate: i8,
4923    #[doc = "Navigational status"]
4924    pub navigational_status: AisNavStatus,
4925    #[doc = "Type of vessels"]
4926    pub mavtype: AisType,
4927    #[doc = "Distance from lat/lon location to port side"]
4928    pub dimension_port: u8,
4929    #[doc = "Distance from lat/lon location to starboard side"]
4930    pub dimension_starboard: u8,
4931    #[doc = "The vessel callsign"]
4932    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4933    pub callsign: [u8; 7],
4934    #[doc = "The vessel name"]
4935    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4936    pub name: [u8; 20],
4937}
4938impl AIS_VESSEL_DATA {
4939    pub const ENCODED_LEN: usize = 58usize;
4940    pub const DEFAULT: Self = Self {
4941        MMSI: 0_u32,
4942        lat: 0_i32,
4943        lon: 0_i32,
4944        COG: 0_u16,
4945        heading: 0_u16,
4946        velocity: 0_u16,
4947        dimension_bow: 0_u16,
4948        dimension_stern: 0_u16,
4949        tslc: 0_u16,
4950        flags: AisFlags::DEFAULT,
4951        turn_rate: 0_i8,
4952        navigational_status: AisNavStatus::DEFAULT,
4953        mavtype: AisType::DEFAULT,
4954        dimension_port: 0_u8,
4955        dimension_starboard: 0_u8,
4956        callsign: [0_u8; 7usize],
4957        name: [0_u8; 20usize],
4958    };
4959    #[cfg(feature = "arbitrary")]
4960    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4961        use arbitrary::{Arbitrary, Unstructured};
4962        let mut buf = [0u8; 1024];
4963        rng.fill_bytes(&mut buf);
4964        let mut unstructured = Unstructured::new(&buf);
4965        Self::arbitrary(&mut unstructured).unwrap_or_default()
4966    }
4967}
4968impl Default for AIS_VESSEL_DATA {
4969    fn default() -> Self {
4970        Self::DEFAULT.clone()
4971    }
4972}
4973impl MessageData for AIS_VESSEL_DATA {
4974    type Message = MavMessage;
4975    const ID: u32 = 301u32;
4976    const NAME: &'static str = "AIS_VESSEL";
4977    const EXTRA_CRC: u8 = 243u8;
4978    const ENCODED_LEN: usize = 58usize;
4979    fn deser(
4980        _version: MavlinkVersion,
4981        __input: &[u8],
4982    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4983        let avail_len = __input.len();
4984        let mut payload_buf = [0; Self::ENCODED_LEN];
4985        let mut buf = if avail_len < Self::ENCODED_LEN {
4986            payload_buf[0..avail_len].copy_from_slice(__input);
4987            Bytes::new(&payload_buf)
4988        } else {
4989            Bytes::new(__input)
4990        };
4991        let mut __struct = Self::default();
4992        __struct.MMSI = buf.get_u32_le();
4993        __struct.lat = buf.get_i32_le();
4994        __struct.lon = buf.get_i32_le();
4995        __struct.COG = buf.get_u16_le();
4996        __struct.heading = buf.get_u16_le();
4997        __struct.velocity = buf.get_u16_le();
4998        __struct.dimension_bow = buf.get_u16_le();
4999        __struct.dimension_stern = buf.get_u16_le();
5000        __struct.tslc = buf.get_u16_le();
5001        let tmp = buf.get_u16_le();
5002        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
5003            ::mavlink_core::error::ParserError::InvalidFlag {
5004                flag_type: "AisFlags",
5005                value: tmp as u32,
5006            },
5007        )?;
5008        __struct.turn_rate = buf.get_i8();
5009        let tmp = buf.get_u8();
5010        __struct.navigational_status =
5011            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5012                enum_type: "AisNavStatus",
5013                value: tmp as u32,
5014            })?;
5015        let tmp = buf.get_u8();
5016        __struct.mavtype =
5017            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5018                enum_type: "AisType",
5019                value: tmp as u32,
5020            })?;
5021        __struct.dimension_port = buf.get_u8();
5022        __struct.dimension_starboard = buf.get_u8();
5023        for v in &mut __struct.callsign {
5024            let val = buf.get_u8();
5025            *v = val;
5026        }
5027        for v in &mut __struct.name {
5028            let val = buf.get_u8();
5029            *v = val;
5030        }
5031        Ok(__struct)
5032    }
5033    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5034        let mut __tmp = BytesMut::new(bytes);
5035        #[allow(clippy::absurd_extreme_comparisons)]
5036        #[allow(unused_comparisons)]
5037        if __tmp.remaining() < Self::ENCODED_LEN {
5038            panic!(
5039                "buffer is too small (need {} bytes, but got {})",
5040                Self::ENCODED_LEN,
5041                __tmp.remaining(),
5042            )
5043        }
5044        __tmp.put_u32_le(self.MMSI);
5045        __tmp.put_i32_le(self.lat);
5046        __tmp.put_i32_le(self.lon);
5047        __tmp.put_u16_le(self.COG);
5048        __tmp.put_u16_le(self.heading);
5049        __tmp.put_u16_le(self.velocity);
5050        __tmp.put_u16_le(self.dimension_bow);
5051        __tmp.put_u16_le(self.dimension_stern);
5052        __tmp.put_u16_le(self.tslc);
5053        __tmp.put_u16_le(self.flags.bits());
5054        __tmp.put_i8(self.turn_rate);
5055        __tmp.put_u8(self.navigational_status as u8);
5056        __tmp.put_u8(self.mavtype as u8);
5057        __tmp.put_u8(self.dimension_port);
5058        __tmp.put_u8(self.dimension_starboard);
5059        for val in &self.callsign {
5060            __tmp.put_u8(*val);
5061        }
5062        for val in &self.name {
5063            __tmp.put_u8(*val);
5064        }
5065        if matches!(version, MavlinkVersion::V2) {
5066            let len = __tmp.len();
5067            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5068        } else {
5069            __tmp.len()
5070        }
5071    }
5072}
5073#[doc = "id: 141"]
5074#[doc = "The current system altitude."]
5075#[derive(Debug, Clone, PartialEq)]
5076#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5077#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5078pub struct ALTITUDE_DATA {
5079    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5080    pub time_usec: u64,
5081    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5082    pub altitude_monotonic: f32,
5083    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5084    pub altitude_amsl: f32,
5085    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5086    pub altitude_local: f32,
5087    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5088    pub altitude_relative: f32,
5089    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5090    pub altitude_terrain: f32,
5091    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5092    pub bottom_clearance: f32,
5093}
5094impl ALTITUDE_DATA {
5095    pub const ENCODED_LEN: usize = 32usize;
5096    pub const DEFAULT: Self = Self {
5097        time_usec: 0_u64,
5098        altitude_monotonic: 0.0_f32,
5099        altitude_amsl: 0.0_f32,
5100        altitude_local: 0.0_f32,
5101        altitude_relative: 0.0_f32,
5102        altitude_terrain: 0.0_f32,
5103        bottom_clearance: 0.0_f32,
5104    };
5105    #[cfg(feature = "arbitrary")]
5106    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5107        use arbitrary::{Arbitrary, Unstructured};
5108        let mut buf = [0u8; 1024];
5109        rng.fill_bytes(&mut buf);
5110        let mut unstructured = Unstructured::new(&buf);
5111        Self::arbitrary(&mut unstructured).unwrap_or_default()
5112    }
5113}
5114impl Default for ALTITUDE_DATA {
5115    fn default() -> Self {
5116        Self::DEFAULT.clone()
5117    }
5118}
5119impl MessageData for ALTITUDE_DATA {
5120    type Message = MavMessage;
5121    const ID: u32 = 141u32;
5122    const NAME: &'static str = "ALTITUDE";
5123    const EXTRA_CRC: u8 = 47u8;
5124    const ENCODED_LEN: usize = 32usize;
5125    fn deser(
5126        _version: MavlinkVersion,
5127        __input: &[u8],
5128    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5129        let avail_len = __input.len();
5130        let mut payload_buf = [0; Self::ENCODED_LEN];
5131        let mut buf = if avail_len < Self::ENCODED_LEN {
5132            payload_buf[0..avail_len].copy_from_slice(__input);
5133            Bytes::new(&payload_buf)
5134        } else {
5135            Bytes::new(__input)
5136        };
5137        let mut __struct = Self::default();
5138        __struct.time_usec = buf.get_u64_le();
5139        __struct.altitude_monotonic = buf.get_f32_le();
5140        __struct.altitude_amsl = buf.get_f32_le();
5141        __struct.altitude_local = buf.get_f32_le();
5142        __struct.altitude_relative = buf.get_f32_le();
5143        __struct.altitude_terrain = buf.get_f32_le();
5144        __struct.bottom_clearance = buf.get_f32_le();
5145        Ok(__struct)
5146    }
5147    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5148        let mut __tmp = BytesMut::new(bytes);
5149        #[allow(clippy::absurd_extreme_comparisons)]
5150        #[allow(unused_comparisons)]
5151        if __tmp.remaining() < Self::ENCODED_LEN {
5152            panic!(
5153                "buffer is too small (need {} bytes, but got {})",
5154                Self::ENCODED_LEN,
5155                __tmp.remaining(),
5156            )
5157        }
5158        __tmp.put_u64_le(self.time_usec);
5159        __tmp.put_f32_le(self.altitude_monotonic);
5160        __tmp.put_f32_le(self.altitude_amsl);
5161        __tmp.put_f32_le(self.altitude_local);
5162        __tmp.put_f32_le(self.altitude_relative);
5163        __tmp.put_f32_le(self.altitude_terrain);
5164        __tmp.put_f32_le(self.bottom_clearance);
5165        if matches!(version, MavlinkVersion::V2) {
5166            let len = __tmp.len();
5167            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5168        } else {
5169            __tmp.len()
5170        }
5171    }
5172}
5173#[doc = "id: 181"]
5174#[doc = "The altitude measured by sensors and IMU."]
5175#[derive(Debug, Clone, PartialEq)]
5176#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5177#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5178pub struct ALTITUDES_DATA {
5179    #[doc = "Timestamp (milliseconds since system boot)"]
5180    pub time_boot_ms: u32,
5181    #[doc = "GPS altitude (MSL) in meters, expressed as * 1000 (millimeters)"]
5182    pub alt_gps: i32,
5183    #[doc = "IMU altitude above ground in meters, expressed as * 1000 (millimeters)"]
5184    pub alt_imu: i32,
5185    #[doc = "barometeric altitude above ground in meters, expressed as * 1000 (millimeters)"]
5186    pub alt_barometric: i32,
5187    #[doc = "Optical flow altitude above ground in meters, expressed as * 1000 (millimeters)"]
5188    pub alt_optical_flow: i32,
5189    #[doc = "Rangefinder Altitude above ground in meters, expressed as * 1000 (millimeters)"]
5190    pub alt_range_finder: i32,
5191    #[doc = "Extra altitude above ground in meters, expressed as * 1000 (millimeters)"]
5192    pub alt_extra: i32,
5193}
5194impl ALTITUDES_DATA {
5195    pub const ENCODED_LEN: usize = 28usize;
5196    pub const DEFAULT: Self = Self {
5197        time_boot_ms: 0_u32,
5198        alt_gps: 0_i32,
5199        alt_imu: 0_i32,
5200        alt_barometric: 0_i32,
5201        alt_optical_flow: 0_i32,
5202        alt_range_finder: 0_i32,
5203        alt_extra: 0_i32,
5204    };
5205    #[cfg(feature = "arbitrary")]
5206    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5207        use arbitrary::{Arbitrary, Unstructured};
5208        let mut buf = [0u8; 1024];
5209        rng.fill_bytes(&mut buf);
5210        let mut unstructured = Unstructured::new(&buf);
5211        Self::arbitrary(&mut unstructured).unwrap_or_default()
5212    }
5213}
5214impl Default for ALTITUDES_DATA {
5215    fn default() -> Self {
5216        Self::DEFAULT.clone()
5217    }
5218}
5219impl MessageData for ALTITUDES_DATA {
5220    type Message = MavMessage;
5221    const ID: u32 = 181u32;
5222    const NAME: &'static str = "ALTITUDES";
5223    const EXTRA_CRC: u8 = 55u8;
5224    const ENCODED_LEN: usize = 28usize;
5225    fn deser(
5226        _version: MavlinkVersion,
5227        __input: &[u8],
5228    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5229        let avail_len = __input.len();
5230        let mut payload_buf = [0; Self::ENCODED_LEN];
5231        let mut buf = if avail_len < Self::ENCODED_LEN {
5232            payload_buf[0..avail_len].copy_from_slice(__input);
5233            Bytes::new(&payload_buf)
5234        } else {
5235            Bytes::new(__input)
5236        };
5237        let mut __struct = Self::default();
5238        __struct.time_boot_ms = buf.get_u32_le();
5239        __struct.alt_gps = buf.get_i32_le();
5240        __struct.alt_imu = buf.get_i32_le();
5241        __struct.alt_barometric = buf.get_i32_le();
5242        __struct.alt_optical_flow = buf.get_i32_le();
5243        __struct.alt_range_finder = buf.get_i32_le();
5244        __struct.alt_extra = buf.get_i32_le();
5245        Ok(__struct)
5246    }
5247    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5248        let mut __tmp = BytesMut::new(bytes);
5249        #[allow(clippy::absurd_extreme_comparisons)]
5250        #[allow(unused_comparisons)]
5251        if __tmp.remaining() < Self::ENCODED_LEN {
5252            panic!(
5253                "buffer is too small (need {} bytes, but got {})",
5254                Self::ENCODED_LEN,
5255                __tmp.remaining(),
5256            )
5257        }
5258        __tmp.put_u32_le(self.time_boot_ms);
5259        __tmp.put_i32_le(self.alt_gps);
5260        __tmp.put_i32_le(self.alt_imu);
5261        __tmp.put_i32_le(self.alt_barometric);
5262        __tmp.put_i32_le(self.alt_optical_flow);
5263        __tmp.put_i32_le(self.alt_range_finder);
5264        __tmp.put_i32_le(self.alt_extra);
5265        if matches!(version, MavlinkVersion::V2) {
5266            let len = __tmp.len();
5267            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5268        } else {
5269            __tmp.len()
5270        }
5271    }
5272}
5273#[doc = "id: 30"]
5274#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5275#[derive(Debug, Clone, PartialEq)]
5276#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5277#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5278pub struct ATTITUDE_DATA {
5279    #[doc = "Timestamp (time since system boot)."]
5280    pub time_boot_ms: u32,
5281    #[doc = "Roll angle (-pi..+pi)"]
5282    pub roll: f32,
5283    #[doc = "Pitch angle (-pi..+pi)"]
5284    pub pitch: f32,
5285    #[doc = "Yaw angle (-pi..+pi)"]
5286    pub yaw: f32,
5287    #[doc = "Roll angular speed"]
5288    pub rollspeed: f32,
5289    #[doc = "Pitch angular speed"]
5290    pub pitchspeed: f32,
5291    #[doc = "Yaw angular speed"]
5292    pub yawspeed: f32,
5293}
5294impl ATTITUDE_DATA {
5295    pub const ENCODED_LEN: usize = 28usize;
5296    pub const DEFAULT: Self = Self {
5297        time_boot_ms: 0_u32,
5298        roll: 0.0_f32,
5299        pitch: 0.0_f32,
5300        yaw: 0.0_f32,
5301        rollspeed: 0.0_f32,
5302        pitchspeed: 0.0_f32,
5303        yawspeed: 0.0_f32,
5304    };
5305    #[cfg(feature = "arbitrary")]
5306    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5307        use arbitrary::{Arbitrary, Unstructured};
5308        let mut buf = [0u8; 1024];
5309        rng.fill_bytes(&mut buf);
5310        let mut unstructured = Unstructured::new(&buf);
5311        Self::arbitrary(&mut unstructured).unwrap_or_default()
5312    }
5313}
5314impl Default for ATTITUDE_DATA {
5315    fn default() -> Self {
5316        Self::DEFAULT.clone()
5317    }
5318}
5319impl MessageData for ATTITUDE_DATA {
5320    type Message = MavMessage;
5321    const ID: u32 = 30u32;
5322    const NAME: &'static str = "ATTITUDE";
5323    const EXTRA_CRC: u8 = 39u8;
5324    const ENCODED_LEN: usize = 28usize;
5325    fn deser(
5326        _version: MavlinkVersion,
5327        __input: &[u8],
5328    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5329        let avail_len = __input.len();
5330        let mut payload_buf = [0; Self::ENCODED_LEN];
5331        let mut buf = if avail_len < Self::ENCODED_LEN {
5332            payload_buf[0..avail_len].copy_from_slice(__input);
5333            Bytes::new(&payload_buf)
5334        } else {
5335            Bytes::new(__input)
5336        };
5337        let mut __struct = Self::default();
5338        __struct.time_boot_ms = buf.get_u32_le();
5339        __struct.roll = buf.get_f32_le();
5340        __struct.pitch = buf.get_f32_le();
5341        __struct.yaw = buf.get_f32_le();
5342        __struct.rollspeed = buf.get_f32_le();
5343        __struct.pitchspeed = buf.get_f32_le();
5344        __struct.yawspeed = buf.get_f32_le();
5345        Ok(__struct)
5346    }
5347    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5348        let mut __tmp = BytesMut::new(bytes);
5349        #[allow(clippy::absurd_extreme_comparisons)]
5350        #[allow(unused_comparisons)]
5351        if __tmp.remaining() < Self::ENCODED_LEN {
5352            panic!(
5353                "buffer is too small (need {} bytes, but got {})",
5354                Self::ENCODED_LEN,
5355                __tmp.remaining(),
5356            )
5357        }
5358        __tmp.put_u32_le(self.time_boot_ms);
5359        __tmp.put_f32_le(self.roll);
5360        __tmp.put_f32_le(self.pitch);
5361        __tmp.put_f32_le(self.yaw);
5362        __tmp.put_f32_le(self.rollspeed);
5363        __tmp.put_f32_le(self.pitchspeed);
5364        __tmp.put_f32_le(self.yawspeed);
5365        if matches!(version, MavlinkVersion::V2) {
5366            let len = __tmp.len();
5367            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5368        } else {
5369            __tmp.len()
5370        }
5371    }
5372}
5373#[doc = "id: 31"]
5374#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5375#[derive(Debug, Clone, PartialEq)]
5376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5378pub struct ATTITUDE_QUATERNION_DATA {
5379    #[doc = "Timestamp (time since system boot)."]
5380    pub time_boot_ms: u32,
5381    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5382    pub q1: f32,
5383    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5384    pub q2: f32,
5385    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5386    pub q3: f32,
5387    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5388    pub q4: f32,
5389    #[doc = "Roll angular speed"]
5390    pub rollspeed: f32,
5391    #[doc = "Pitch angular speed"]
5392    pub pitchspeed: f32,
5393    #[doc = "Yaw angular speed"]
5394    pub yawspeed: f32,
5395    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5396    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5397    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5398    pub repr_offset_q: [f32; 4],
5399}
5400impl ATTITUDE_QUATERNION_DATA {
5401    pub const ENCODED_LEN: usize = 48usize;
5402    pub const DEFAULT: Self = Self {
5403        time_boot_ms: 0_u32,
5404        q1: 0.0_f32,
5405        q2: 0.0_f32,
5406        q3: 0.0_f32,
5407        q4: 0.0_f32,
5408        rollspeed: 0.0_f32,
5409        pitchspeed: 0.0_f32,
5410        yawspeed: 0.0_f32,
5411        repr_offset_q: [0.0_f32; 4usize],
5412    };
5413    #[cfg(feature = "arbitrary")]
5414    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5415        use arbitrary::{Arbitrary, Unstructured};
5416        let mut buf = [0u8; 1024];
5417        rng.fill_bytes(&mut buf);
5418        let mut unstructured = Unstructured::new(&buf);
5419        Self::arbitrary(&mut unstructured).unwrap_or_default()
5420    }
5421}
5422impl Default for ATTITUDE_QUATERNION_DATA {
5423    fn default() -> Self {
5424        Self::DEFAULT.clone()
5425    }
5426}
5427impl MessageData for ATTITUDE_QUATERNION_DATA {
5428    type Message = MavMessage;
5429    const ID: u32 = 31u32;
5430    const NAME: &'static str = "ATTITUDE_QUATERNION";
5431    const EXTRA_CRC: u8 = 246u8;
5432    const ENCODED_LEN: usize = 48usize;
5433    fn deser(
5434        _version: MavlinkVersion,
5435        __input: &[u8],
5436    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5437        let avail_len = __input.len();
5438        let mut payload_buf = [0; Self::ENCODED_LEN];
5439        let mut buf = if avail_len < Self::ENCODED_LEN {
5440            payload_buf[0..avail_len].copy_from_slice(__input);
5441            Bytes::new(&payload_buf)
5442        } else {
5443            Bytes::new(__input)
5444        };
5445        let mut __struct = Self::default();
5446        __struct.time_boot_ms = buf.get_u32_le();
5447        __struct.q1 = buf.get_f32_le();
5448        __struct.q2 = buf.get_f32_le();
5449        __struct.q3 = buf.get_f32_le();
5450        __struct.q4 = buf.get_f32_le();
5451        __struct.rollspeed = buf.get_f32_le();
5452        __struct.pitchspeed = buf.get_f32_le();
5453        __struct.yawspeed = buf.get_f32_le();
5454        for v in &mut __struct.repr_offset_q {
5455            let val = buf.get_f32_le();
5456            *v = val;
5457        }
5458        Ok(__struct)
5459    }
5460    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5461        let mut __tmp = BytesMut::new(bytes);
5462        #[allow(clippy::absurd_extreme_comparisons)]
5463        #[allow(unused_comparisons)]
5464        if __tmp.remaining() < Self::ENCODED_LEN {
5465            panic!(
5466                "buffer is too small (need {} bytes, but got {})",
5467                Self::ENCODED_LEN,
5468                __tmp.remaining(),
5469            )
5470        }
5471        __tmp.put_u32_le(self.time_boot_ms);
5472        __tmp.put_f32_le(self.q1);
5473        __tmp.put_f32_le(self.q2);
5474        __tmp.put_f32_le(self.q3);
5475        __tmp.put_f32_le(self.q4);
5476        __tmp.put_f32_le(self.rollspeed);
5477        __tmp.put_f32_le(self.pitchspeed);
5478        __tmp.put_f32_le(self.yawspeed);
5479        for val in &self.repr_offset_q {
5480            __tmp.put_f32_le(*val);
5481        }
5482        if matches!(version, MavlinkVersion::V2) {
5483            let len = __tmp.len();
5484            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5485        } else {
5486            __tmp.len()
5487        }
5488    }
5489}
5490#[doc = "id: 61"]
5491#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5492#[derive(Debug, Clone, PartialEq)]
5493#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5494#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5495pub struct ATTITUDE_QUATERNION_COV_DATA {
5496    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5497    pub time_usec: u64,
5498    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5499    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5500    pub q: [f32; 4],
5501    #[doc = "Roll angular speed"]
5502    pub rollspeed: f32,
5503    #[doc = "Pitch angular speed"]
5504    pub pitchspeed: f32,
5505    #[doc = "Yaw angular speed"]
5506    pub yawspeed: f32,
5507    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5508    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5509    pub covariance: [f32; 9],
5510}
5511impl ATTITUDE_QUATERNION_COV_DATA {
5512    pub const ENCODED_LEN: usize = 72usize;
5513    pub const DEFAULT: Self = Self {
5514        time_usec: 0_u64,
5515        q: [0.0_f32; 4usize],
5516        rollspeed: 0.0_f32,
5517        pitchspeed: 0.0_f32,
5518        yawspeed: 0.0_f32,
5519        covariance: [0.0_f32; 9usize],
5520    };
5521    #[cfg(feature = "arbitrary")]
5522    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5523        use arbitrary::{Arbitrary, Unstructured};
5524        let mut buf = [0u8; 1024];
5525        rng.fill_bytes(&mut buf);
5526        let mut unstructured = Unstructured::new(&buf);
5527        Self::arbitrary(&mut unstructured).unwrap_or_default()
5528    }
5529}
5530impl Default for ATTITUDE_QUATERNION_COV_DATA {
5531    fn default() -> Self {
5532        Self::DEFAULT.clone()
5533    }
5534}
5535impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5536    type Message = MavMessage;
5537    const ID: u32 = 61u32;
5538    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5539    const EXTRA_CRC: u8 = 167u8;
5540    const ENCODED_LEN: usize = 72usize;
5541    fn deser(
5542        _version: MavlinkVersion,
5543        __input: &[u8],
5544    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5545        let avail_len = __input.len();
5546        let mut payload_buf = [0; Self::ENCODED_LEN];
5547        let mut buf = if avail_len < Self::ENCODED_LEN {
5548            payload_buf[0..avail_len].copy_from_slice(__input);
5549            Bytes::new(&payload_buf)
5550        } else {
5551            Bytes::new(__input)
5552        };
5553        let mut __struct = Self::default();
5554        __struct.time_usec = buf.get_u64_le();
5555        for v in &mut __struct.q {
5556            let val = buf.get_f32_le();
5557            *v = val;
5558        }
5559        __struct.rollspeed = buf.get_f32_le();
5560        __struct.pitchspeed = buf.get_f32_le();
5561        __struct.yawspeed = buf.get_f32_le();
5562        for v in &mut __struct.covariance {
5563            let val = buf.get_f32_le();
5564            *v = val;
5565        }
5566        Ok(__struct)
5567    }
5568    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5569        let mut __tmp = BytesMut::new(bytes);
5570        #[allow(clippy::absurd_extreme_comparisons)]
5571        #[allow(unused_comparisons)]
5572        if __tmp.remaining() < Self::ENCODED_LEN {
5573            panic!(
5574                "buffer is too small (need {} bytes, but got {})",
5575                Self::ENCODED_LEN,
5576                __tmp.remaining(),
5577            )
5578        }
5579        __tmp.put_u64_le(self.time_usec);
5580        for val in &self.q {
5581            __tmp.put_f32_le(*val);
5582        }
5583        __tmp.put_f32_le(self.rollspeed);
5584        __tmp.put_f32_le(self.pitchspeed);
5585        __tmp.put_f32_le(self.yawspeed);
5586        for val in &self.covariance {
5587            __tmp.put_f32_le(*val);
5588        }
5589        if matches!(version, MavlinkVersion::V2) {
5590            let len = __tmp.len();
5591            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5592        } else {
5593            __tmp.len()
5594        }
5595    }
5596}
5597#[doc = "id: 83"]
5598#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5599#[derive(Debug, Clone, PartialEq)]
5600#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5601#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5602pub struct ATTITUDE_TARGET_DATA {
5603    #[doc = "Timestamp (time since system boot)."]
5604    pub time_boot_ms: u32,
5605    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5606    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5607    pub q: [f32; 4],
5608    #[doc = "Body roll rate"]
5609    pub body_roll_rate: f32,
5610    #[doc = "Body pitch rate"]
5611    pub body_pitch_rate: f32,
5612    #[doc = "Body yaw rate"]
5613    pub body_yaw_rate: f32,
5614    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5615    pub thrust: f32,
5616    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5617    pub type_mask: AttitudeTargetTypemask,
5618}
5619impl ATTITUDE_TARGET_DATA {
5620    pub const ENCODED_LEN: usize = 37usize;
5621    pub const DEFAULT: Self = Self {
5622        time_boot_ms: 0_u32,
5623        q: [0.0_f32; 4usize],
5624        body_roll_rate: 0.0_f32,
5625        body_pitch_rate: 0.0_f32,
5626        body_yaw_rate: 0.0_f32,
5627        thrust: 0.0_f32,
5628        type_mask: AttitudeTargetTypemask::DEFAULT,
5629    };
5630    #[cfg(feature = "arbitrary")]
5631    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5632        use arbitrary::{Arbitrary, Unstructured};
5633        let mut buf = [0u8; 1024];
5634        rng.fill_bytes(&mut buf);
5635        let mut unstructured = Unstructured::new(&buf);
5636        Self::arbitrary(&mut unstructured).unwrap_or_default()
5637    }
5638}
5639impl Default for ATTITUDE_TARGET_DATA {
5640    fn default() -> Self {
5641        Self::DEFAULT.clone()
5642    }
5643}
5644impl MessageData for ATTITUDE_TARGET_DATA {
5645    type Message = MavMessage;
5646    const ID: u32 = 83u32;
5647    const NAME: &'static str = "ATTITUDE_TARGET";
5648    const EXTRA_CRC: u8 = 22u8;
5649    const ENCODED_LEN: usize = 37usize;
5650    fn deser(
5651        _version: MavlinkVersion,
5652        __input: &[u8],
5653    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5654        let avail_len = __input.len();
5655        let mut payload_buf = [0; Self::ENCODED_LEN];
5656        let mut buf = if avail_len < Self::ENCODED_LEN {
5657            payload_buf[0..avail_len].copy_from_slice(__input);
5658            Bytes::new(&payload_buf)
5659        } else {
5660            Bytes::new(__input)
5661        };
5662        let mut __struct = Self::default();
5663        __struct.time_boot_ms = buf.get_u32_le();
5664        for v in &mut __struct.q {
5665            let val = buf.get_f32_le();
5666            *v = val;
5667        }
5668        __struct.body_roll_rate = buf.get_f32_le();
5669        __struct.body_pitch_rate = buf.get_f32_le();
5670        __struct.body_yaw_rate = buf.get_f32_le();
5671        __struct.thrust = buf.get_f32_le();
5672        let tmp = buf.get_u8();
5673        __struct.type_mask = AttitudeTargetTypemask::from_bits(
5674            tmp & AttitudeTargetTypemask::all().bits(),
5675        )
5676        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5677            flag_type: "AttitudeTargetTypemask",
5678            value: tmp as u32,
5679        })?;
5680        Ok(__struct)
5681    }
5682    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5683        let mut __tmp = BytesMut::new(bytes);
5684        #[allow(clippy::absurd_extreme_comparisons)]
5685        #[allow(unused_comparisons)]
5686        if __tmp.remaining() < Self::ENCODED_LEN {
5687            panic!(
5688                "buffer is too small (need {} bytes, but got {})",
5689                Self::ENCODED_LEN,
5690                __tmp.remaining(),
5691            )
5692        }
5693        __tmp.put_u32_le(self.time_boot_ms);
5694        for val in &self.q {
5695            __tmp.put_f32_le(*val);
5696        }
5697        __tmp.put_f32_le(self.body_roll_rate);
5698        __tmp.put_f32_le(self.body_pitch_rate);
5699        __tmp.put_f32_le(self.body_yaw_rate);
5700        __tmp.put_f32_le(self.thrust);
5701        __tmp.put_u8(self.type_mask.bits());
5702        if matches!(version, MavlinkVersion::V2) {
5703            let len = __tmp.len();
5704            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5705        } else {
5706            __tmp.len()
5707        }
5708    }
5709}
5710#[doc = "id: 138"]
5711#[doc = "Motion capture attitude and position."]
5712#[derive(Debug, Clone, PartialEq)]
5713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5715pub struct ATT_POS_MOCAP_DATA {
5716    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5717    pub time_usec: u64,
5718    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5719    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5720    pub q: [f32; 4],
5721    #[doc = "X position (NED)"]
5722    pub x: f32,
5723    #[doc = "Y position (NED)"]
5724    pub y: f32,
5725    #[doc = "Z position (NED)"]
5726    pub z: f32,
5727    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5728    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5729    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5730    pub covariance: [f32; 21],
5731}
5732impl ATT_POS_MOCAP_DATA {
5733    pub const ENCODED_LEN: usize = 120usize;
5734    pub const DEFAULT: Self = Self {
5735        time_usec: 0_u64,
5736        q: [0.0_f32; 4usize],
5737        x: 0.0_f32,
5738        y: 0.0_f32,
5739        z: 0.0_f32,
5740        covariance: [0.0_f32; 21usize],
5741    };
5742    #[cfg(feature = "arbitrary")]
5743    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5744        use arbitrary::{Arbitrary, Unstructured};
5745        let mut buf = [0u8; 1024];
5746        rng.fill_bytes(&mut buf);
5747        let mut unstructured = Unstructured::new(&buf);
5748        Self::arbitrary(&mut unstructured).unwrap_or_default()
5749    }
5750}
5751impl Default for ATT_POS_MOCAP_DATA {
5752    fn default() -> Self {
5753        Self::DEFAULT.clone()
5754    }
5755}
5756impl MessageData for ATT_POS_MOCAP_DATA {
5757    type Message = MavMessage;
5758    const ID: u32 = 138u32;
5759    const NAME: &'static str = "ATT_POS_MOCAP";
5760    const EXTRA_CRC: u8 = 109u8;
5761    const ENCODED_LEN: usize = 120usize;
5762    fn deser(
5763        _version: MavlinkVersion,
5764        __input: &[u8],
5765    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5766        let avail_len = __input.len();
5767        let mut payload_buf = [0; Self::ENCODED_LEN];
5768        let mut buf = if avail_len < Self::ENCODED_LEN {
5769            payload_buf[0..avail_len].copy_from_slice(__input);
5770            Bytes::new(&payload_buf)
5771        } else {
5772            Bytes::new(__input)
5773        };
5774        let mut __struct = Self::default();
5775        __struct.time_usec = buf.get_u64_le();
5776        for v in &mut __struct.q {
5777            let val = buf.get_f32_le();
5778            *v = val;
5779        }
5780        __struct.x = buf.get_f32_le();
5781        __struct.y = buf.get_f32_le();
5782        __struct.z = buf.get_f32_le();
5783        for v in &mut __struct.covariance {
5784            let val = buf.get_f32_le();
5785            *v = val;
5786        }
5787        Ok(__struct)
5788    }
5789    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5790        let mut __tmp = BytesMut::new(bytes);
5791        #[allow(clippy::absurd_extreme_comparisons)]
5792        #[allow(unused_comparisons)]
5793        if __tmp.remaining() < Self::ENCODED_LEN {
5794            panic!(
5795                "buffer is too small (need {} bytes, but got {})",
5796                Self::ENCODED_LEN,
5797                __tmp.remaining(),
5798            )
5799        }
5800        __tmp.put_u64_le(self.time_usec);
5801        for val in &self.q {
5802            __tmp.put_f32_le(*val);
5803        }
5804        __tmp.put_f32_le(self.x);
5805        __tmp.put_f32_le(self.y);
5806        __tmp.put_f32_le(self.z);
5807        for val in &self.covariance {
5808            __tmp.put_f32_le(*val);
5809        }
5810        if matches!(version, MavlinkVersion::V2) {
5811            let len = __tmp.len();
5812            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5813        } else {
5814            __tmp.len()
5815        }
5816    }
5817}
5818#[doc = "id: 7"]
5819#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5820#[derive(Debug, Clone, PartialEq)]
5821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5823pub struct AUTH_KEY_DATA {
5824    #[doc = "key"]
5825    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5826    pub key: [u8; 32],
5827}
5828impl AUTH_KEY_DATA {
5829    pub const ENCODED_LEN: usize = 32usize;
5830    pub const DEFAULT: Self = Self {
5831        key: [0_u8; 32usize],
5832    };
5833    #[cfg(feature = "arbitrary")]
5834    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5835        use arbitrary::{Arbitrary, Unstructured};
5836        let mut buf = [0u8; 1024];
5837        rng.fill_bytes(&mut buf);
5838        let mut unstructured = Unstructured::new(&buf);
5839        Self::arbitrary(&mut unstructured).unwrap_or_default()
5840    }
5841}
5842impl Default for AUTH_KEY_DATA {
5843    fn default() -> Self {
5844        Self::DEFAULT.clone()
5845    }
5846}
5847impl MessageData for AUTH_KEY_DATA {
5848    type Message = MavMessage;
5849    const ID: u32 = 7u32;
5850    const NAME: &'static str = "AUTH_KEY";
5851    const EXTRA_CRC: u8 = 119u8;
5852    const ENCODED_LEN: usize = 32usize;
5853    fn deser(
5854        _version: MavlinkVersion,
5855        __input: &[u8],
5856    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5857        let avail_len = __input.len();
5858        let mut payload_buf = [0; Self::ENCODED_LEN];
5859        let mut buf = if avail_len < Self::ENCODED_LEN {
5860            payload_buf[0..avail_len].copy_from_slice(__input);
5861            Bytes::new(&payload_buf)
5862        } else {
5863            Bytes::new(__input)
5864        };
5865        let mut __struct = Self::default();
5866        for v in &mut __struct.key {
5867            let val = buf.get_u8();
5868            *v = val;
5869        }
5870        Ok(__struct)
5871    }
5872    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5873        let mut __tmp = BytesMut::new(bytes);
5874        #[allow(clippy::absurd_extreme_comparisons)]
5875        #[allow(unused_comparisons)]
5876        if __tmp.remaining() < Self::ENCODED_LEN {
5877            panic!(
5878                "buffer is too small (need {} bytes, but got {})",
5879                Self::ENCODED_LEN,
5880                __tmp.remaining(),
5881            )
5882        }
5883        for val in &self.key {
5884            __tmp.put_u8(*val);
5885        }
5886        if matches!(version, MavlinkVersion::V2) {
5887            let len = __tmp.len();
5888            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5889        } else {
5890            __tmp.len()
5891        }
5892    }
5893}
5894#[doc = "id: 286"]
5895#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
5896#[derive(Debug, Clone, PartialEq)]
5897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5899pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5900    #[doc = "Timestamp (time since system boot)."]
5901    pub time_boot_us: u64,
5902    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
5903    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5904    pub q: [f32; 4],
5905    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
5906    pub q_estimated_delay_us: u32,
5907    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
5908    pub vx: f32,
5909    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
5910    pub vy: f32,
5911    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
5912    pub vz: f32,
5913    #[doc = "Estimated delay of the speed data. 0 if unknown."]
5914    pub v_estimated_delay_us: u32,
5915    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
5916    pub feed_forward_angular_velocity_z: f32,
5917    #[doc = "Bitmap indicating which estimator outputs are valid."]
5918    pub estimator_status: EstimatorStatusFlags,
5919    #[doc = "System ID"]
5920    pub target_system: u8,
5921    #[doc = "Component ID"]
5922    pub target_component: u8,
5923    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
5924    pub landed_state: MavLandedState,
5925    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
5926    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5927    pub angular_velocity_z: f32,
5928}
5929impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5930    pub const ENCODED_LEN: usize = 57usize;
5931    pub const DEFAULT: Self = Self {
5932        time_boot_us: 0_u64,
5933        q: [0.0_f32; 4usize],
5934        q_estimated_delay_us: 0_u32,
5935        vx: 0.0_f32,
5936        vy: 0.0_f32,
5937        vz: 0.0_f32,
5938        v_estimated_delay_us: 0_u32,
5939        feed_forward_angular_velocity_z: 0.0_f32,
5940        estimator_status: EstimatorStatusFlags::DEFAULT,
5941        target_system: 0_u8,
5942        target_component: 0_u8,
5943        landed_state: MavLandedState::DEFAULT,
5944        angular_velocity_z: 0.0_f32,
5945    };
5946    #[cfg(feature = "arbitrary")]
5947    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5948        use arbitrary::{Arbitrary, Unstructured};
5949        let mut buf = [0u8; 1024];
5950        rng.fill_bytes(&mut buf);
5951        let mut unstructured = Unstructured::new(&buf);
5952        Self::arbitrary(&mut unstructured).unwrap_or_default()
5953    }
5954}
5955impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5956    fn default() -> Self {
5957        Self::DEFAULT.clone()
5958    }
5959}
5960impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5961    type Message = MavMessage;
5962    const ID: u32 = 286u32;
5963    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
5964    const EXTRA_CRC: u8 = 210u8;
5965    const ENCODED_LEN: usize = 57usize;
5966    fn deser(
5967        _version: MavlinkVersion,
5968        __input: &[u8],
5969    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5970        let avail_len = __input.len();
5971        let mut payload_buf = [0; Self::ENCODED_LEN];
5972        let mut buf = if avail_len < Self::ENCODED_LEN {
5973            payload_buf[0..avail_len].copy_from_slice(__input);
5974            Bytes::new(&payload_buf)
5975        } else {
5976            Bytes::new(__input)
5977        };
5978        let mut __struct = Self::default();
5979        __struct.time_boot_us = buf.get_u64_le();
5980        for v in &mut __struct.q {
5981            let val = buf.get_f32_le();
5982            *v = val;
5983        }
5984        __struct.q_estimated_delay_us = buf.get_u32_le();
5985        __struct.vx = buf.get_f32_le();
5986        __struct.vy = buf.get_f32_le();
5987        __struct.vz = buf.get_f32_le();
5988        __struct.v_estimated_delay_us = buf.get_u32_le();
5989        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
5990        let tmp = buf.get_u16_le();
5991        __struct.estimator_status = EstimatorStatusFlags::from_bits(
5992            tmp & EstimatorStatusFlags::all().bits(),
5993        )
5994        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5995            flag_type: "EstimatorStatusFlags",
5996            value: tmp as u32,
5997        })?;
5998        __struct.target_system = buf.get_u8();
5999        __struct.target_component = buf.get_u8();
6000        let tmp = buf.get_u8();
6001        __struct.landed_state =
6002            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6003                enum_type: "MavLandedState",
6004                value: tmp as u32,
6005            })?;
6006        __struct.angular_velocity_z = buf.get_f32_le();
6007        Ok(__struct)
6008    }
6009    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6010        let mut __tmp = BytesMut::new(bytes);
6011        #[allow(clippy::absurd_extreme_comparisons)]
6012        #[allow(unused_comparisons)]
6013        if __tmp.remaining() < Self::ENCODED_LEN {
6014            panic!(
6015                "buffer is too small (need {} bytes, but got {})",
6016                Self::ENCODED_LEN,
6017                __tmp.remaining(),
6018            )
6019        }
6020        __tmp.put_u64_le(self.time_boot_us);
6021        for val in &self.q {
6022            __tmp.put_f32_le(*val);
6023        }
6024        __tmp.put_u32_le(self.q_estimated_delay_us);
6025        __tmp.put_f32_le(self.vx);
6026        __tmp.put_f32_le(self.vy);
6027        __tmp.put_f32_le(self.vz);
6028        __tmp.put_u32_le(self.v_estimated_delay_us);
6029        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6030        __tmp.put_u16_le(self.estimator_status.bits());
6031        __tmp.put_u8(self.target_system);
6032        __tmp.put_u8(self.target_component);
6033        __tmp.put_u8(self.landed_state as u8);
6034        __tmp.put_f32_le(self.angular_velocity_z);
6035        if matches!(version, MavlinkVersion::V2) {
6036            let len = __tmp.len();
6037            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6038        } else {
6039            __tmp.len()
6040        }
6041    }
6042}
6043#[doc = "id: 148"]
6044#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6045#[derive(Debug, Clone, PartialEq)]
6046#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6047#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6048pub struct AUTOPILOT_VERSION_DATA {
6049    #[doc = "Bitmap of capabilities"]
6050    pub capabilities: MavProtocolCapability,
6051    #[doc = "UID if provided by hardware (see uid2)"]
6052    pub uid: u64,
6053    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6054    pub flight_sw_version: u32,
6055    #[doc = "Middleware version number"]
6056    pub middleware_sw_version: u32,
6057    #[doc = "Operating system version number"]
6058    pub os_sw_version: u32,
6059    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6060    pub board_version: u32,
6061    #[doc = "ID of the board vendor"]
6062    pub vendor_id: u16,
6063    #[doc = "ID of the product"]
6064    pub product_id: u16,
6065    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6066    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6067    pub flight_custom_version: [u8; 8],
6068    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6069    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6070    pub middleware_custom_version: [u8; 8],
6071    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6072    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6073    pub os_custom_version: [u8; 8],
6074    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6075    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6076    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6077    pub uid2: [u8; 18],
6078}
6079impl AUTOPILOT_VERSION_DATA {
6080    pub const ENCODED_LEN: usize = 78usize;
6081    pub const DEFAULT: Self = Self {
6082        capabilities: MavProtocolCapability::DEFAULT,
6083        uid: 0_u64,
6084        flight_sw_version: 0_u32,
6085        middleware_sw_version: 0_u32,
6086        os_sw_version: 0_u32,
6087        board_version: 0_u32,
6088        vendor_id: 0_u16,
6089        product_id: 0_u16,
6090        flight_custom_version: [0_u8; 8usize],
6091        middleware_custom_version: [0_u8; 8usize],
6092        os_custom_version: [0_u8; 8usize],
6093        uid2: [0_u8; 18usize],
6094    };
6095    #[cfg(feature = "arbitrary")]
6096    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6097        use arbitrary::{Arbitrary, Unstructured};
6098        let mut buf = [0u8; 1024];
6099        rng.fill_bytes(&mut buf);
6100        let mut unstructured = Unstructured::new(&buf);
6101        Self::arbitrary(&mut unstructured).unwrap_or_default()
6102    }
6103}
6104impl Default for AUTOPILOT_VERSION_DATA {
6105    fn default() -> Self {
6106        Self::DEFAULT.clone()
6107    }
6108}
6109impl MessageData for AUTOPILOT_VERSION_DATA {
6110    type Message = MavMessage;
6111    const ID: u32 = 148u32;
6112    const NAME: &'static str = "AUTOPILOT_VERSION";
6113    const EXTRA_CRC: u8 = 178u8;
6114    const ENCODED_LEN: usize = 78usize;
6115    fn deser(
6116        _version: MavlinkVersion,
6117        __input: &[u8],
6118    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6119        let avail_len = __input.len();
6120        let mut payload_buf = [0; Self::ENCODED_LEN];
6121        let mut buf = if avail_len < Self::ENCODED_LEN {
6122            payload_buf[0..avail_len].copy_from_slice(__input);
6123            Bytes::new(&payload_buf)
6124        } else {
6125            Bytes::new(__input)
6126        };
6127        let mut __struct = Self::default();
6128        let tmp = buf.get_u64_le();
6129        __struct.capabilities = MavProtocolCapability::from_bits(
6130            tmp & MavProtocolCapability::all().bits(),
6131        )
6132        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6133            flag_type: "MavProtocolCapability",
6134            value: tmp as u32,
6135        })?;
6136        __struct.uid = buf.get_u64_le();
6137        __struct.flight_sw_version = buf.get_u32_le();
6138        __struct.middleware_sw_version = buf.get_u32_le();
6139        __struct.os_sw_version = buf.get_u32_le();
6140        __struct.board_version = buf.get_u32_le();
6141        __struct.vendor_id = buf.get_u16_le();
6142        __struct.product_id = buf.get_u16_le();
6143        for v in &mut __struct.flight_custom_version {
6144            let val = buf.get_u8();
6145            *v = val;
6146        }
6147        for v in &mut __struct.middleware_custom_version {
6148            let val = buf.get_u8();
6149            *v = val;
6150        }
6151        for v in &mut __struct.os_custom_version {
6152            let val = buf.get_u8();
6153            *v = val;
6154        }
6155        for v in &mut __struct.uid2 {
6156            let val = buf.get_u8();
6157            *v = val;
6158        }
6159        Ok(__struct)
6160    }
6161    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6162        let mut __tmp = BytesMut::new(bytes);
6163        #[allow(clippy::absurd_extreme_comparisons)]
6164        #[allow(unused_comparisons)]
6165        if __tmp.remaining() < Self::ENCODED_LEN {
6166            panic!(
6167                "buffer is too small (need {} bytes, but got {})",
6168                Self::ENCODED_LEN,
6169                __tmp.remaining(),
6170            )
6171        }
6172        __tmp.put_u64_le(self.capabilities.bits());
6173        __tmp.put_u64_le(self.uid);
6174        __tmp.put_u32_le(self.flight_sw_version);
6175        __tmp.put_u32_le(self.middleware_sw_version);
6176        __tmp.put_u32_le(self.os_sw_version);
6177        __tmp.put_u32_le(self.board_version);
6178        __tmp.put_u16_le(self.vendor_id);
6179        __tmp.put_u16_le(self.product_id);
6180        for val in &self.flight_custom_version {
6181            __tmp.put_u8(*val);
6182        }
6183        for val in &self.middleware_custom_version {
6184            __tmp.put_u8(*val);
6185        }
6186        for val in &self.os_custom_version {
6187            __tmp.put_u8(*val);
6188        }
6189        for val in &self.uid2 {
6190            __tmp.put_u8(*val);
6191        }
6192        if matches!(version, MavlinkVersion::V2) {
6193            let len = __tmp.len();
6194            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6195        } else {
6196            __tmp.len()
6197        }
6198    }
6199}
6200#[doc = "id: 435"]
6201#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6202#[derive(Debug, Clone, PartialEq)]
6203#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6204#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6205pub struct AVAILABLE_MODES_DATA {
6206    #[doc = "A bitfield for use for autopilot-specific flags"]
6207    pub custom_mode: u32,
6208    #[doc = "Mode properties."]
6209    pub properties: MavModeProperty,
6210    #[doc = "The total number of available modes for the current vehicle type."]
6211    pub number_modes: u8,
6212    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6213    pub mode_index: u8,
6214    #[doc = "Standard mode."]
6215    pub standard_mode: MavStandardMode,
6216    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6217    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6218    pub mode_name: [u8; 35],
6219}
6220impl AVAILABLE_MODES_DATA {
6221    pub const ENCODED_LEN: usize = 46usize;
6222    pub const DEFAULT: Self = Self {
6223        custom_mode: 0_u32,
6224        properties: MavModeProperty::DEFAULT,
6225        number_modes: 0_u8,
6226        mode_index: 0_u8,
6227        standard_mode: MavStandardMode::DEFAULT,
6228        mode_name: [0_u8; 35usize],
6229    };
6230    #[cfg(feature = "arbitrary")]
6231    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6232        use arbitrary::{Arbitrary, Unstructured};
6233        let mut buf = [0u8; 1024];
6234        rng.fill_bytes(&mut buf);
6235        let mut unstructured = Unstructured::new(&buf);
6236        Self::arbitrary(&mut unstructured).unwrap_or_default()
6237    }
6238}
6239impl Default for AVAILABLE_MODES_DATA {
6240    fn default() -> Self {
6241        Self::DEFAULT.clone()
6242    }
6243}
6244impl MessageData for AVAILABLE_MODES_DATA {
6245    type Message = MavMessage;
6246    const ID: u32 = 435u32;
6247    const NAME: &'static str = "AVAILABLE_MODES";
6248    const EXTRA_CRC: u8 = 134u8;
6249    const ENCODED_LEN: usize = 46usize;
6250    fn deser(
6251        _version: MavlinkVersion,
6252        __input: &[u8],
6253    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6254        let avail_len = __input.len();
6255        let mut payload_buf = [0; Self::ENCODED_LEN];
6256        let mut buf = if avail_len < Self::ENCODED_LEN {
6257            payload_buf[0..avail_len].copy_from_slice(__input);
6258            Bytes::new(&payload_buf)
6259        } else {
6260            Bytes::new(__input)
6261        };
6262        let mut __struct = Self::default();
6263        __struct.custom_mode = buf.get_u32_le();
6264        let tmp = buf.get_u32_le();
6265        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6266            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6267                flag_type: "MavModeProperty",
6268                value: tmp as u32,
6269            })?;
6270        __struct.number_modes = buf.get_u8();
6271        __struct.mode_index = buf.get_u8();
6272        let tmp = buf.get_u8();
6273        __struct.standard_mode =
6274            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6275                enum_type: "MavStandardMode",
6276                value: tmp as u32,
6277            })?;
6278        for v in &mut __struct.mode_name {
6279            let val = buf.get_u8();
6280            *v = val;
6281        }
6282        Ok(__struct)
6283    }
6284    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6285        let mut __tmp = BytesMut::new(bytes);
6286        #[allow(clippy::absurd_extreme_comparisons)]
6287        #[allow(unused_comparisons)]
6288        if __tmp.remaining() < Self::ENCODED_LEN {
6289            panic!(
6290                "buffer is too small (need {} bytes, but got {})",
6291                Self::ENCODED_LEN,
6292                __tmp.remaining(),
6293            )
6294        }
6295        __tmp.put_u32_le(self.custom_mode);
6296        __tmp.put_u32_le(self.properties.bits());
6297        __tmp.put_u8(self.number_modes);
6298        __tmp.put_u8(self.mode_index);
6299        __tmp.put_u8(self.standard_mode as u8);
6300        for val in &self.mode_name {
6301            __tmp.put_u8(*val);
6302        }
6303        if matches!(version, MavlinkVersion::V2) {
6304            let len = __tmp.len();
6305            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6306        } else {
6307            __tmp.len()
6308        }
6309    }
6310}
6311#[doc = "id: 437"]
6312#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6313#[derive(Debug, Clone, PartialEq)]
6314#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6316pub struct AVAILABLE_MODES_MONITOR_DATA {
6317    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6318    pub seq: u8,
6319}
6320impl AVAILABLE_MODES_MONITOR_DATA {
6321    pub const ENCODED_LEN: usize = 1usize;
6322    pub const DEFAULT: Self = Self { seq: 0_u8 };
6323    #[cfg(feature = "arbitrary")]
6324    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6325        use arbitrary::{Arbitrary, Unstructured};
6326        let mut buf = [0u8; 1024];
6327        rng.fill_bytes(&mut buf);
6328        let mut unstructured = Unstructured::new(&buf);
6329        Self::arbitrary(&mut unstructured).unwrap_or_default()
6330    }
6331}
6332impl Default for AVAILABLE_MODES_MONITOR_DATA {
6333    fn default() -> Self {
6334        Self::DEFAULT.clone()
6335    }
6336}
6337impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6338    type Message = MavMessage;
6339    const ID: u32 = 437u32;
6340    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6341    const EXTRA_CRC: u8 = 30u8;
6342    const ENCODED_LEN: usize = 1usize;
6343    fn deser(
6344        _version: MavlinkVersion,
6345        __input: &[u8],
6346    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6347        let avail_len = __input.len();
6348        let mut payload_buf = [0; Self::ENCODED_LEN];
6349        let mut buf = if avail_len < Self::ENCODED_LEN {
6350            payload_buf[0..avail_len].copy_from_slice(__input);
6351            Bytes::new(&payload_buf)
6352        } else {
6353            Bytes::new(__input)
6354        };
6355        let mut __struct = Self::default();
6356        __struct.seq = buf.get_u8();
6357        Ok(__struct)
6358    }
6359    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6360        let mut __tmp = BytesMut::new(bytes);
6361        #[allow(clippy::absurd_extreme_comparisons)]
6362        #[allow(unused_comparisons)]
6363        if __tmp.remaining() < Self::ENCODED_LEN {
6364            panic!(
6365                "buffer is too small (need {} bytes, but got {})",
6366                Self::ENCODED_LEN,
6367                __tmp.remaining(),
6368            )
6369        }
6370        __tmp.put_u8(self.seq);
6371        if matches!(version, MavlinkVersion::V2) {
6372            let len = __tmp.len();
6373            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6374        } else {
6375            __tmp.len()
6376        }
6377    }
6378}
6379#[doc = "id: 372"]
6380#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6381#[derive(Debug, Clone, PartialEq)]
6382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6383#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6384pub struct BATTERY_INFO_DATA {
6385    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6386    pub discharge_minimum_voltage: f32,
6387    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6388    pub charging_minimum_voltage: f32,
6389    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6390    pub resting_minimum_voltage: f32,
6391    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6392    pub charging_maximum_voltage: f32,
6393    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6394    pub charging_maximum_current: f32,
6395    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6396    pub nominal_voltage: f32,
6397    #[doc = "Maximum pack discharge current. 0: field not provided."]
6398    pub discharge_maximum_current: f32,
6399    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6400    pub discharge_maximum_burst_current: f32,
6401    #[doc = "Fully charged design capacity. 0: field not provided."]
6402    pub design_capacity: f32,
6403    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6404    pub full_charge_capacity: f32,
6405    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6406    pub cycle_count: u16,
6407    #[doc = "Battery weight. 0: field not provided."]
6408    pub weight: u16,
6409    #[doc = "Battery ID"]
6410    pub id: u8,
6411    #[doc = "Function of the battery."]
6412    pub battery_function: MavBatteryFunction,
6413    #[doc = "Type (chemistry) of the battery."]
6414    pub mavtype: MavBatteryType,
6415    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6416    pub state_of_health: u8,
6417    #[doc = "Number of battery cells in series. 0: field not provided."]
6418    pub cells_in_series: u8,
6419    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6420    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6421    pub manufacture_date: [u8; 9],
6422    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6423    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6424    pub serial_number: [u8; 32],
6425    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6426    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6427    pub name: [u8; 50],
6428}
6429impl BATTERY_INFO_DATA {
6430    pub const ENCODED_LEN: usize = 140usize;
6431    pub const DEFAULT: Self = Self {
6432        discharge_minimum_voltage: 0.0_f32,
6433        charging_minimum_voltage: 0.0_f32,
6434        resting_minimum_voltage: 0.0_f32,
6435        charging_maximum_voltage: 0.0_f32,
6436        charging_maximum_current: 0.0_f32,
6437        nominal_voltage: 0.0_f32,
6438        discharge_maximum_current: 0.0_f32,
6439        discharge_maximum_burst_current: 0.0_f32,
6440        design_capacity: 0.0_f32,
6441        full_charge_capacity: 0.0_f32,
6442        cycle_count: 0_u16,
6443        weight: 0_u16,
6444        id: 0_u8,
6445        battery_function: MavBatteryFunction::DEFAULT,
6446        mavtype: MavBatteryType::DEFAULT,
6447        state_of_health: 0_u8,
6448        cells_in_series: 0_u8,
6449        manufacture_date: [0_u8; 9usize],
6450        serial_number: [0_u8; 32usize],
6451        name: [0_u8; 50usize],
6452    };
6453    #[cfg(feature = "arbitrary")]
6454    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6455        use arbitrary::{Arbitrary, Unstructured};
6456        let mut buf = [0u8; 1024];
6457        rng.fill_bytes(&mut buf);
6458        let mut unstructured = Unstructured::new(&buf);
6459        Self::arbitrary(&mut unstructured).unwrap_or_default()
6460    }
6461}
6462impl Default for BATTERY_INFO_DATA {
6463    fn default() -> Self {
6464        Self::DEFAULT.clone()
6465    }
6466}
6467impl MessageData for BATTERY_INFO_DATA {
6468    type Message = MavMessage;
6469    const ID: u32 = 372u32;
6470    const NAME: &'static str = "BATTERY_INFO";
6471    const EXTRA_CRC: u8 = 26u8;
6472    const ENCODED_LEN: usize = 140usize;
6473    fn deser(
6474        _version: MavlinkVersion,
6475        __input: &[u8],
6476    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6477        let avail_len = __input.len();
6478        let mut payload_buf = [0; Self::ENCODED_LEN];
6479        let mut buf = if avail_len < Self::ENCODED_LEN {
6480            payload_buf[0..avail_len].copy_from_slice(__input);
6481            Bytes::new(&payload_buf)
6482        } else {
6483            Bytes::new(__input)
6484        };
6485        let mut __struct = Self::default();
6486        __struct.discharge_minimum_voltage = buf.get_f32_le();
6487        __struct.charging_minimum_voltage = buf.get_f32_le();
6488        __struct.resting_minimum_voltage = buf.get_f32_le();
6489        __struct.charging_maximum_voltage = buf.get_f32_le();
6490        __struct.charging_maximum_current = buf.get_f32_le();
6491        __struct.nominal_voltage = buf.get_f32_le();
6492        __struct.discharge_maximum_current = buf.get_f32_le();
6493        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6494        __struct.design_capacity = buf.get_f32_le();
6495        __struct.full_charge_capacity = buf.get_f32_le();
6496        __struct.cycle_count = buf.get_u16_le();
6497        __struct.weight = buf.get_u16_le();
6498        __struct.id = buf.get_u8();
6499        let tmp = buf.get_u8();
6500        __struct.battery_function =
6501            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6502                enum_type: "MavBatteryFunction",
6503                value: tmp as u32,
6504            })?;
6505        let tmp = buf.get_u8();
6506        __struct.mavtype =
6507            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6508                enum_type: "MavBatteryType",
6509                value: tmp as u32,
6510            })?;
6511        __struct.state_of_health = buf.get_u8();
6512        __struct.cells_in_series = buf.get_u8();
6513        for v in &mut __struct.manufacture_date {
6514            let val = buf.get_u8();
6515            *v = val;
6516        }
6517        for v in &mut __struct.serial_number {
6518            let val = buf.get_u8();
6519            *v = val;
6520        }
6521        for v in &mut __struct.name {
6522            let val = buf.get_u8();
6523            *v = val;
6524        }
6525        Ok(__struct)
6526    }
6527    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6528        let mut __tmp = BytesMut::new(bytes);
6529        #[allow(clippy::absurd_extreme_comparisons)]
6530        #[allow(unused_comparisons)]
6531        if __tmp.remaining() < Self::ENCODED_LEN {
6532            panic!(
6533                "buffer is too small (need {} bytes, but got {})",
6534                Self::ENCODED_LEN,
6535                __tmp.remaining(),
6536            )
6537        }
6538        __tmp.put_f32_le(self.discharge_minimum_voltage);
6539        __tmp.put_f32_le(self.charging_minimum_voltage);
6540        __tmp.put_f32_le(self.resting_minimum_voltage);
6541        __tmp.put_f32_le(self.charging_maximum_voltage);
6542        __tmp.put_f32_le(self.charging_maximum_current);
6543        __tmp.put_f32_le(self.nominal_voltage);
6544        __tmp.put_f32_le(self.discharge_maximum_current);
6545        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6546        __tmp.put_f32_le(self.design_capacity);
6547        __tmp.put_f32_le(self.full_charge_capacity);
6548        __tmp.put_u16_le(self.cycle_count);
6549        __tmp.put_u16_le(self.weight);
6550        __tmp.put_u8(self.id);
6551        __tmp.put_u8(self.battery_function as u8);
6552        __tmp.put_u8(self.mavtype as u8);
6553        __tmp.put_u8(self.state_of_health);
6554        __tmp.put_u8(self.cells_in_series);
6555        for val in &self.manufacture_date {
6556            __tmp.put_u8(*val);
6557        }
6558        for val in &self.serial_number {
6559            __tmp.put_u8(*val);
6560        }
6561        for val in &self.name {
6562            __tmp.put_u8(*val);
6563        }
6564        if matches!(version, MavlinkVersion::V2) {
6565            let len = __tmp.len();
6566            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6567        } else {
6568            __tmp.len()
6569        }
6570    }
6571}
6572#[doc = "id: 147"]
6573#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6574#[derive(Debug, Clone, PartialEq)]
6575#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6576#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6577pub struct BATTERY_STATUS_DATA {
6578    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6579    pub current_consumed: i32,
6580    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6581    pub energy_consumed: i32,
6582    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6583    pub temperature: i16,
6584    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6585    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6586    pub voltages: [u16; 10],
6587    #[doc = "Battery current, -1: autopilot does not measure the current"]
6588    pub current_battery: i16,
6589    #[doc = "Battery ID"]
6590    pub id: u8,
6591    #[doc = "Function of the battery"]
6592    pub battery_function: MavBatteryFunction,
6593    #[doc = "Type (chemistry) of the battery"]
6594    pub mavtype: MavBatteryType,
6595    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6596    pub battery_remaining: i8,
6597    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6598    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6599    pub time_remaining: i32,
6600    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6601    #[cfg_attr(feature = "serde", serde(default))]
6602    pub charge_state: MavBatteryChargeState,
6603    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6604    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6605    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6606    pub voltages_ext: [u16; 4],
6607    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6608    #[cfg_attr(feature = "serde", serde(default))]
6609    pub mode: MavBatteryMode,
6610    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6611    #[cfg_attr(feature = "serde", serde(default))]
6612    pub fault_bitmask: MavBatteryFault,
6613}
6614impl BATTERY_STATUS_DATA {
6615    pub const ENCODED_LEN: usize = 54usize;
6616    pub const DEFAULT: Self = Self {
6617        current_consumed: 0_i32,
6618        energy_consumed: 0_i32,
6619        temperature: 0_i16,
6620        voltages: [0_u16; 10usize],
6621        current_battery: 0_i16,
6622        id: 0_u8,
6623        battery_function: MavBatteryFunction::DEFAULT,
6624        mavtype: MavBatteryType::DEFAULT,
6625        battery_remaining: 0_i8,
6626        time_remaining: 0_i32,
6627        charge_state: MavBatteryChargeState::DEFAULT,
6628        voltages_ext: [0_u16; 4usize],
6629        mode: MavBatteryMode::DEFAULT,
6630        fault_bitmask: MavBatteryFault::DEFAULT,
6631    };
6632    #[cfg(feature = "arbitrary")]
6633    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6634        use arbitrary::{Arbitrary, Unstructured};
6635        let mut buf = [0u8; 1024];
6636        rng.fill_bytes(&mut buf);
6637        let mut unstructured = Unstructured::new(&buf);
6638        Self::arbitrary(&mut unstructured).unwrap_or_default()
6639    }
6640}
6641impl Default for BATTERY_STATUS_DATA {
6642    fn default() -> Self {
6643        Self::DEFAULT.clone()
6644    }
6645}
6646impl MessageData for BATTERY_STATUS_DATA {
6647    type Message = MavMessage;
6648    const ID: u32 = 147u32;
6649    const NAME: &'static str = "BATTERY_STATUS";
6650    const EXTRA_CRC: u8 = 154u8;
6651    const ENCODED_LEN: usize = 54usize;
6652    fn deser(
6653        _version: MavlinkVersion,
6654        __input: &[u8],
6655    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6656        let avail_len = __input.len();
6657        let mut payload_buf = [0; Self::ENCODED_LEN];
6658        let mut buf = if avail_len < Self::ENCODED_LEN {
6659            payload_buf[0..avail_len].copy_from_slice(__input);
6660            Bytes::new(&payload_buf)
6661        } else {
6662            Bytes::new(__input)
6663        };
6664        let mut __struct = Self::default();
6665        __struct.current_consumed = buf.get_i32_le();
6666        __struct.energy_consumed = buf.get_i32_le();
6667        __struct.temperature = buf.get_i16_le();
6668        for v in &mut __struct.voltages {
6669            let val = buf.get_u16_le();
6670            *v = val;
6671        }
6672        __struct.current_battery = buf.get_i16_le();
6673        __struct.id = buf.get_u8();
6674        let tmp = buf.get_u8();
6675        __struct.battery_function =
6676            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6677                enum_type: "MavBatteryFunction",
6678                value: tmp as u32,
6679            })?;
6680        let tmp = buf.get_u8();
6681        __struct.mavtype =
6682            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6683                enum_type: "MavBatteryType",
6684                value: tmp as u32,
6685            })?;
6686        __struct.battery_remaining = buf.get_i8();
6687        __struct.time_remaining = buf.get_i32_le();
6688        let tmp = buf.get_u8();
6689        __struct.charge_state =
6690            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6691                enum_type: "MavBatteryChargeState",
6692                value: tmp as u32,
6693            })?;
6694        for v in &mut __struct.voltages_ext {
6695            let val = buf.get_u16_le();
6696            *v = val;
6697        }
6698        let tmp = buf.get_u8();
6699        __struct.mode =
6700            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6701                enum_type: "MavBatteryMode",
6702                value: tmp as u32,
6703            })?;
6704        let tmp = buf.get_u32_le();
6705        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
6706            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6707                flag_type: "MavBatteryFault",
6708                value: tmp as u32,
6709            })?;
6710        Ok(__struct)
6711    }
6712    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6713        let mut __tmp = BytesMut::new(bytes);
6714        #[allow(clippy::absurd_extreme_comparisons)]
6715        #[allow(unused_comparisons)]
6716        if __tmp.remaining() < Self::ENCODED_LEN {
6717            panic!(
6718                "buffer is too small (need {} bytes, but got {})",
6719                Self::ENCODED_LEN,
6720                __tmp.remaining(),
6721            )
6722        }
6723        __tmp.put_i32_le(self.current_consumed);
6724        __tmp.put_i32_le(self.energy_consumed);
6725        __tmp.put_i16_le(self.temperature);
6726        for val in &self.voltages {
6727            __tmp.put_u16_le(*val);
6728        }
6729        __tmp.put_i16_le(self.current_battery);
6730        __tmp.put_u8(self.id);
6731        __tmp.put_u8(self.battery_function as u8);
6732        __tmp.put_u8(self.mavtype as u8);
6733        __tmp.put_i8(self.battery_remaining);
6734        __tmp.put_i32_le(self.time_remaining);
6735        __tmp.put_u8(self.charge_state as u8);
6736        for val in &self.voltages_ext {
6737            __tmp.put_u16_le(*val);
6738        }
6739        __tmp.put_u8(self.mode as u8);
6740        __tmp.put_u32_le(self.fault_bitmask.bits());
6741        if matches!(version, MavlinkVersion::V2) {
6742            let len = __tmp.len();
6743            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6744        } else {
6745            __tmp.len()
6746        }
6747    }
6748}
6749#[doc = "id: 257"]
6750#[doc = "Report button state change."]
6751#[derive(Debug, Clone, PartialEq)]
6752#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6753#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6754pub struct BUTTON_CHANGE_DATA {
6755    #[doc = "Timestamp (time since system boot)."]
6756    pub time_boot_ms: u32,
6757    #[doc = "Time of last change of button state."]
6758    pub last_change_ms: u32,
6759    #[doc = "Bitmap for state of buttons."]
6760    pub state: u8,
6761}
6762impl BUTTON_CHANGE_DATA {
6763    pub const ENCODED_LEN: usize = 9usize;
6764    pub const DEFAULT: Self = Self {
6765        time_boot_ms: 0_u32,
6766        last_change_ms: 0_u32,
6767        state: 0_u8,
6768    };
6769    #[cfg(feature = "arbitrary")]
6770    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6771        use arbitrary::{Arbitrary, Unstructured};
6772        let mut buf = [0u8; 1024];
6773        rng.fill_bytes(&mut buf);
6774        let mut unstructured = Unstructured::new(&buf);
6775        Self::arbitrary(&mut unstructured).unwrap_or_default()
6776    }
6777}
6778impl Default for BUTTON_CHANGE_DATA {
6779    fn default() -> Self {
6780        Self::DEFAULT.clone()
6781    }
6782}
6783impl MessageData for BUTTON_CHANGE_DATA {
6784    type Message = MavMessage;
6785    const ID: u32 = 257u32;
6786    const NAME: &'static str = "BUTTON_CHANGE";
6787    const EXTRA_CRC: u8 = 131u8;
6788    const ENCODED_LEN: usize = 9usize;
6789    fn deser(
6790        _version: MavlinkVersion,
6791        __input: &[u8],
6792    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6793        let avail_len = __input.len();
6794        let mut payload_buf = [0; Self::ENCODED_LEN];
6795        let mut buf = if avail_len < Self::ENCODED_LEN {
6796            payload_buf[0..avail_len].copy_from_slice(__input);
6797            Bytes::new(&payload_buf)
6798        } else {
6799            Bytes::new(__input)
6800        };
6801        let mut __struct = Self::default();
6802        __struct.time_boot_ms = buf.get_u32_le();
6803        __struct.last_change_ms = buf.get_u32_le();
6804        __struct.state = buf.get_u8();
6805        Ok(__struct)
6806    }
6807    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6808        let mut __tmp = BytesMut::new(bytes);
6809        #[allow(clippy::absurd_extreme_comparisons)]
6810        #[allow(unused_comparisons)]
6811        if __tmp.remaining() < Self::ENCODED_LEN {
6812            panic!(
6813                "buffer is too small (need {} bytes, but got {})",
6814                Self::ENCODED_LEN,
6815                __tmp.remaining(),
6816            )
6817        }
6818        __tmp.put_u32_le(self.time_boot_ms);
6819        __tmp.put_u32_le(self.last_change_ms);
6820        __tmp.put_u8(self.state);
6821        if matches!(version, MavlinkVersion::V2) {
6822            let len = __tmp.len();
6823            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6824        } else {
6825            __tmp.len()
6826        }
6827    }
6828}
6829#[doc = "id: 262"]
6830#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6831#[derive(Debug, Clone, PartialEq)]
6832#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6833#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6834pub struct CAMERA_CAPTURE_STATUS_DATA {
6835    #[doc = "Timestamp (time since system boot)."]
6836    pub time_boot_ms: u32,
6837    #[doc = "Image capture interval"]
6838    pub image_interval: f32,
6839    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
6840    pub recording_time_ms: u32,
6841    #[doc = "Available storage capacity."]
6842    pub available_capacity: f32,
6843    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
6844    pub image_status: u8,
6845    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
6846    pub video_status: u8,
6847    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
6848    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6849    pub image_count: i32,
6850    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6851    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6852    pub camera_device_id: u8,
6853}
6854impl CAMERA_CAPTURE_STATUS_DATA {
6855    pub const ENCODED_LEN: usize = 23usize;
6856    pub const DEFAULT: Self = Self {
6857        time_boot_ms: 0_u32,
6858        image_interval: 0.0_f32,
6859        recording_time_ms: 0_u32,
6860        available_capacity: 0.0_f32,
6861        image_status: 0_u8,
6862        video_status: 0_u8,
6863        image_count: 0_i32,
6864        camera_device_id: 0_u8,
6865    };
6866    #[cfg(feature = "arbitrary")]
6867    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6868        use arbitrary::{Arbitrary, Unstructured};
6869        let mut buf = [0u8; 1024];
6870        rng.fill_bytes(&mut buf);
6871        let mut unstructured = Unstructured::new(&buf);
6872        Self::arbitrary(&mut unstructured).unwrap_or_default()
6873    }
6874}
6875impl Default for CAMERA_CAPTURE_STATUS_DATA {
6876    fn default() -> Self {
6877        Self::DEFAULT.clone()
6878    }
6879}
6880impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
6881    type Message = MavMessage;
6882    const ID: u32 = 262u32;
6883    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
6884    const EXTRA_CRC: u8 = 12u8;
6885    const ENCODED_LEN: usize = 23usize;
6886    fn deser(
6887        _version: MavlinkVersion,
6888        __input: &[u8],
6889    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6890        let avail_len = __input.len();
6891        let mut payload_buf = [0; Self::ENCODED_LEN];
6892        let mut buf = if avail_len < Self::ENCODED_LEN {
6893            payload_buf[0..avail_len].copy_from_slice(__input);
6894            Bytes::new(&payload_buf)
6895        } else {
6896            Bytes::new(__input)
6897        };
6898        let mut __struct = Self::default();
6899        __struct.time_boot_ms = buf.get_u32_le();
6900        __struct.image_interval = buf.get_f32_le();
6901        __struct.recording_time_ms = buf.get_u32_le();
6902        __struct.available_capacity = buf.get_f32_le();
6903        __struct.image_status = buf.get_u8();
6904        __struct.video_status = buf.get_u8();
6905        __struct.image_count = buf.get_i32_le();
6906        __struct.camera_device_id = buf.get_u8();
6907        Ok(__struct)
6908    }
6909    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6910        let mut __tmp = BytesMut::new(bytes);
6911        #[allow(clippy::absurd_extreme_comparisons)]
6912        #[allow(unused_comparisons)]
6913        if __tmp.remaining() < Self::ENCODED_LEN {
6914            panic!(
6915                "buffer is too small (need {} bytes, but got {})",
6916                Self::ENCODED_LEN,
6917                __tmp.remaining(),
6918            )
6919        }
6920        __tmp.put_u32_le(self.time_boot_ms);
6921        __tmp.put_f32_le(self.image_interval);
6922        __tmp.put_u32_le(self.recording_time_ms);
6923        __tmp.put_f32_le(self.available_capacity);
6924        __tmp.put_u8(self.image_status);
6925        __tmp.put_u8(self.video_status);
6926        __tmp.put_i32_le(self.image_count);
6927        __tmp.put_u8(self.camera_device_id);
6928        if matches!(version, MavlinkVersion::V2) {
6929            let len = __tmp.len();
6930            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6931        } else {
6932            __tmp.len()
6933        }
6934    }
6935}
6936#[doc = "id: 271"]
6937#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6938#[derive(Debug, Clone, PartialEq)]
6939#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6941pub struct CAMERA_FOV_STATUS_DATA {
6942    #[doc = "Timestamp (time since system boot)."]
6943    pub time_boot_ms: u32,
6944    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
6945    pub lat_camera: i32,
6946    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
6947    pub lon_camera: i32,
6948    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
6949    pub alt_camera: i32,
6950    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
6951    pub lat_image: i32,
6952    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
6953    pub lon_image: i32,
6954    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
6955    pub alt_image: i32,
6956    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6957    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6958    pub q: [f32; 4],
6959    #[doc = "Horizontal field of view (NaN if unknown)."]
6960    pub hfov: f32,
6961    #[doc = "Vertical field of view (NaN if unknown)."]
6962    pub vfov: f32,
6963    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6964    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6965    pub camera_device_id: u8,
6966}
6967impl CAMERA_FOV_STATUS_DATA {
6968    pub const ENCODED_LEN: usize = 53usize;
6969    pub const DEFAULT: Self = Self {
6970        time_boot_ms: 0_u32,
6971        lat_camera: 0_i32,
6972        lon_camera: 0_i32,
6973        alt_camera: 0_i32,
6974        lat_image: 0_i32,
6975        lon_image: 0_i32,
6976        alt_image: 0_i32,
6977        q: [0.0_f32; 4usize],
6978        hfov: 0.0_f32,
6979        vfov: 0.0_f32,
6980        camera_device_id: 0_u8,
6981    };
6982    #[cfg(feature = "arbitrary")]
6983    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6984        use arbitrary::{Arbitrary, Unstructured};
6985        let mut buf = [0u8; 1024];
6986        rng.fill_bytes(&mut buf);
6987        let mut unstructured = Unstructured::new(&buf);
6988        Self::arbitrary(&mut unstructured).unwrap_or_default()
6989    }
6990}
6991impl Default for CAMERA_FOV_STATUS_DATA {
6992    fn default() -> Self {
6993        Self::DEFAULT.clone()
6994    }
6995}
6996impl MessageData for CAMERA_FOV_STATUS_DATA {
6997    type Message = MavMessage;
6998    const ID: u32 = 271u32;
6999    const NAME: &'static str = "CAMERA_FOV_STATUS";
7000    const EXTRA_CRC: u8 = 22u8;
7001    const ENCODED_LEN: usize = 53usize;
7002    fn deser(
7003        _version: MavlinkVersion,
7004        __input: &[u8],
7005    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7006        let avail_len = __input.len();
7007        let mut payload_buf = [0; Self::ENCODED_LEN];
7008        let mut buf = if avail_len < Self::ENCODED_LEN {
7009            payload_buf[0..avail_len].copy_from_slice(__input);
7010            Bytes::new(&payload_buf)
7011        } else {
7012            Bytes::new(__input)
7013        };
7014        let mut __struct = Self::default();
7015        __struct.time_boot_ms = buf.get_u32_le();
7016        __struct.lat_camera = buf.get_i32_le();
7017        __struct.lon_camera = buf.get_i32_le();
7018        __struct.alt_camera = buf.get_i32_le();
7019        __struct.lat_image = buf.get_i32_le();
7020        __struct.lon_image = buf.get_i32_le();
7021        __struct.alt_image = buf.get_i32_le();
7022        for v in &mut __struct.q {
7023            let val = buf.get_f32_le();
7024            *v = val;
7025        }
7026        __struct.hfov = buf.get_f32_le();
7027        __struct.vfov = buf.get_f32_le();
7028        __struct.camera_device_id = buf.get_u8();
7029        Ok(__struct)
7030    }
7031    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7032        let mut __tmp = BytesMut::new(bytes);
7033        #[allow(clippy::absurd_extreme_comparisons)]
7034        #[allow(unused_comparisons)]
7035        if __tmp.remaining() < Self::ENCODED_LEN {
7036            panic!(
7037                "buffer is too small (need {} bytes, but got {})",
7038                Self::ENCODED_LEN,
7039                __tmp.remaining(),
7040            )
7041        }
7042        __tmp.put_u32_le(self.time_boot_ms);
7043        __tmp.put_i32_le(self.lat_camera);
7044        __tmp.put_i32_le(self.lon_camera);
7045        __tmp.put_i32_le(self.alt_camera);
7046        __tmp.put_i32_le(self.lat_image);
7047        __tmp.put_i32_le(self.lon_image);
7048        __tmp.put_i32_le(self.alt_image);
7049        for val in &self.q {
7050            __tmp.put_f32_le(*val);
7051        }
7052        __tmp.put_f32_le(self.hfov);
7053        __tmp.put_f32_le(self.vfov);
7054        __tmp.put_u8(self.camera_device_id);
7055        if matches!(version, MavlinkVersion::V2) {
7056            let len = __tmp.len();
7057            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7058        } else {
7059            __tmp.len()
7060        }
7061    }
7062}
7063#[doc = "id: 263"]
7064#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7065#[derive(Debug, Clone, PartialEq)]
7066#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7067#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7068pub struct CAMERA_IMAGE_CAPTURED_DATA {
7069    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7070    pub time_utc: u64,
7071    #[doc = "Timestamp (time since system boot)."]
7072    pub time_boot_ms: u32,
7073    #[doc = "Latitude where image was taken"]
7074    pub lat: i32,
7075    #[doc = "Longitude where capture was taken"]
7076    pub lon: i32,
7077    #[doc = "Altitude (MSL) where image was taken"]
7078    pub alt: i32,
7079    #[doc = "Altitude above ground"]
7080    pub relative_alt: i32,
7081    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7082    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7083    pub q: [f32; 4],
7084    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7085    pub image_index: i32,
7086    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7087    pub camera_id: u8,
7088    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7089    pub capture_result: i8,
7090    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7091    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7092    pub file_url: [u8; 205],
7093}
7094impl CAMERA_IMAGE_CAPTURED_DATA {
7095    pub const ENCODED_LEN: usize = 255usize;
7096    pub const DEFAULT: Self = Self {
7097        time_utc: 0_u64,
7098        time_boot_ms: 0_u32,
7099        lat: 0_i32,
7100        lon: 0_i32,
7101        alt: 0_i32,
7102        relative_alt: 0_i32,
7103        q: [0.0_f32; 4usize],
7104        image_index: 0_i32,
7105        camera_id: 0_u8,
7106        capture_result: 0_i8,
7107        file_url: [0_u8; 205usize],
7108    };
7109    #[cfg(feature = "arbitrary")]
7110    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7111        use arbitrary::{Arbitrary, Unstructured};
7112        let mut buf = [0u8; 1024];
7113        rng.fill_bytes(&mut buf);
7114        let mut unstructured = Unstructured::new(&buf);
7115        Self::arbitrary(&mut unstructured).unwrap_or_default()
7116    }
7117}
7118impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7119    fn default() -> Self {
7120        Self::DEFAULT.clone()
7121    }
7122}
7123impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7124    type Message = MavMessage;
7125    const ID: u32 = 263u32;
7126    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7127    const EXTRA_CRC: u8 = 133u8;
7128    const ENCODED_LEN: usize = 255usize;
7129    fn deser(
7130        _version: MavlinkVersion,
7131        __input: &[u8],
7132    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7133        let avail_len = __input.len();
7134        let mut payload_buf = [0; Self::ENCODED_LEN];
7135        let mut buf = if avail_len < Self::ENCODED_LEN {
7136            payload_buf[0..avail_len].copy_from_slice(__input);
7137            Bytes::new(&payload_buf)
7138        } else {
7139            Bytes::new(__input)
7140        };
7141        let mut __struct = Self::default();
7142        __struct.time_utc = buf.get_u64_le();
7143        __struct.time_boot_ms = buf.get_u32_le();
7144        __struct.lat = buf.get_i32_le();
7145        __struct.lon = buf.get_i32_le();
7146        __struct.alt = buf.get_i32_le();
7147        __struct.relative_alt = buf.get_i32_le();
7148        for v in &mut __struct.q {
7149            let val = buf.get_f32_le();
7150            *v = val;
7151        }
7152        __struct.image_index = buf.get_i32_le();
7153        __struct.camera_id = buf.get_u8();
7154        __struct.capture_result = buf.get_i8();
7155        for v in &mut __struct.file_url {
7156            let val = buf.get_u8();
7157            *v = val;
7158        }
7159        Ok(__struct)
7160    }
7161    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7162        let mut __tmp = BytesMut::new(bytes);
7163        #[allow(clippy::absurd_extreme_comparisons)]
7164        #[allow(unused_comparisons)]
7165        if __tmp.remaining() < Self::ENCODED_LEN {
7166            panic!(
7167                "buffer is too small (need {} bytes, but got {})",
7168                Self::ENCODED_LEN,
7169                __tmp.remaining(),
7170            )
7171        }
7172        __tmp.put_u64_le(self.time_utc);
7173        __tmp.put_u32_le(self.time_boot_ms);
7174        __tmp.put_i32_le(self.lat);
7175        __tmp.put_i32_le(self.lon);
7176        __tmp.put_i32_le(self.alt);
7177        __tmp.put_i32_le(self.relative_alt);
7178        for val in &self.q {
7179            __tmp.put_f32_le(*val);
7180        }
7181        __tmp.put_i32_le(self.image_index);
7182        __tmp.put_u8(self.camera_id);
7183        __tmp.put_i8(self.capture_result);
7184        for val in &self.file_url {
7185            __tmp.put_u8(*val);
7186        }
7187        if matches!(version, MavlinkVersion::V2) {
7188            let len = __tmp.len();
7189            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7190        } else {
7191            __tmp.len()
7192        }
7193    }
7194}
7195#[doc = "id: 259"]
7196#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7197#[derive(Debug, Clone, PartialEq)]
7198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7200pub struct CAMERA_INFORMATION_DATA {
7201    #[doc = "Timestamp (time since system boot)."]
7202    pub time_boot_ms: u32,
7203    #[doc = "0xff). Use 0 if not known."]
7204    pub firmware_version: u32,
7205    #[doc = "Focal length. Use NaN if not known."]
7206    pub focal_length: f32,
7207    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7208    pub sensor_size_h: f32,
7209    #[doc = "Image sensor size vertical. Use NaN if not known."]
7210    pub sensor_size_v: f32,
7211    #[doc = "Bitmap of camera capability flags."]
7212    pub flags: CameraCapFlags,
7213    #[doc = "Horizontal image resolution. Use 0 if not known."]
7214    pub resolution_h: u16,
7215    #[doc = "Vertical image resolution. Use 0 if not known."]
7216    pub resolution_v: u16,
7217    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7218    pub cam_definition_version: u16,
7219    #[doc = "Name of the camera vendor"]
7220    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7221    pub vendor_name: [u8; 32],
7222    #[doc = "Name of the camera model"]
7223    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7224    pub model_name: [u8; 32],
7225    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7226    pub lens_id: u8,
7227    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7228    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7229    pub cam_definition_uri: [u8; 140],
7230    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7231    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7232    pub gimbal_device_id: u8,
7233    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7234    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7235    pub camera_device_id: u8,
7236}
7237impl CAMERA_INFORMATION_DATA {
7238    pub const ENCODED_LEN: usize = 237usize;
7239    pub const DEFAULT: Self = Self {
7240        time_boot_ms: 0_u32,
7241        firmware_version: 0_u32,
7242        focal_length: 0.0_f32,
7243        sensor_size_h: 0.0_f32,
7244        sensor_size_v: 0.0_f32,
7245        flags: CameraCapFlags::DEFAULT,
7246        resolution_h: 0_u16,
7247        resolution_v: 0_u16,
7248        cam_definition_version: 0_u16,
7249        vendor_name: [0_u8; 32usize],
7250        model_name: [0_u8; 32usize],
7251        lens_id: 0_u8,
7252        cam_definition_uri: [0_u8; 140usize],
7253        gimbal_device_id: 0_u8,
7254        camera_device_id: 0_u8,
7255    };
7256    #[cfg(feature = "arbitrary")]
7257    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7258        use arbitrary::{Arbitrary, Unstructured};
7259        let mut buf = [0u8; 1024];
7260        rng.fill_bytes(&mut buf);
7261        let mut unstructured = Unstructured::new(&buf);
7262        Self::arbitrary(&mut unstructured).unwrap_or_default()
7263    }
7264}
7265impl Default for CAMERA_INFORMATION_DATA {
7266    fn default() -> Self {
7267        Self::DEFAULT.clone()
7268    }
7269}
7270impl MessageData for CAMERA_INFORMATION_DATA {
7271    type Message = MavMessage;
7272    const ID: u32 = 259u32;
7273    const NAME: &'static str = "CAMERA_INFORMATION";
7274    const EXTRA_CRC: u8 = 92u8;
7275    const ENCODED_LEN: usize = 237usize;
7276    fn deser(
7277        _version: MavlinkVersion,
7278        __input: &[u8],
7279    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7280        let avail_len = __input.len();
7281        let mut payload_buf = [0; Self::ENCODED_LEN];
7282        let mut buf = if avail_len < Self::ENCODED_LEN {
7283            payload_buf[0..avail_len].copy_from_slice(__input);
7284            Bytes::new(&payload_buf)
7285        } else {
7286            Bytes::new(__input)
7287        };
7288        let mut __struct = Self::default();
7289        __struct.time_boot_ms = buf.get_u32_le();
7290        __struct.firmware_version = buf.get_u32_le();
7291        __struct.focal_length = buf.get_f32_le();
7292        __struct.sensor_size_h = buf.get_f32_le();
7293        __struct.sensor_size_v = buf.get_f32_le();
7294        let tmp = buf.get_u32_le();
7295        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7296            ::mavlink_core::error::ParserError::InvalidFlag {
7297                flag_type: "CameraCapFlags",
7298                value: tmp as u32,
7299            },
7300        )?;
7301        __struct.resolution_h = buf.get_u16_le();
7302        __struct.resolution_v = buf.get_u16_le();
7303        __struct.cam_definition_version = buf.get_u16_le();
7304        for v in &mut __struct.vendor_name {
7305            let val = buf.get_u8();
7306            *v = val;
7307        }
7308        for v in &mut __struct.model_name {
7309            let val = buf.get_u8();
7310            *v = val;
7311        }
7312        __struct.lens_id = buf.get_u8();
7313        for v in &mut __struct.cam_definition_uri {
7314            let val = buf.get_u8();
7315            *v = val;
7316        }
7317        __struct.gimbal_device_id = buf.get_u8();
7318        __struct.camera_device_id = buf.get_u8();
7319        Ok(__struct)
7320    }
7321    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7322        let mut __tmp = BytesMut::new(bytes);
7323        #[allow(clippy::absurd_extreme_comparisons)]
7324        #[allow(unused_comparisons)]
7325        if __tmp.remaining() < Self::ENCODED_LEN {
7326            panic!(
7327                "buffer is too small (need {} bytes, but got {})",
7328                Self::ENCODED_LEN,
7329                __tmp.remaining(),
7330            )
7331        }
7332        __tmp.put_u32_le(self.time_boot_ms);
7333        __tmp.put_u32_le(self.firmware_version);
7334        __tmp.put_f32_le(self.focal_length);
7335        __tmp.put_f32_le(self.sensor_size_h);
7336        __tmp.put_f32_le(self.sensor_size_v);
7337        __tmp.put_u32_le(self.flags.bits());
7338        __tmp.put_u16_le(self.resolution_h);
7339        __tmp.put_u16_le(self.resolution_v);
7340        __tmp.put_u16_le(self.cam_definition_version);
7341        for val in &self.vendor_name {
7342            __tmp.put_u8(*val);
7343        }
7344        for val in &self.model_name {
7345            __tmp.put_u8(*val);
7346        }
7347        __tmp.put_u8(self.lens_id);
7348        for val in &self.cam_definition_uri {
7349            __tmp.put_u8(*val);
7350        }
7351        __tmp.put_u8(self.gimbal_device_id);
7352        __tmp.put_u8(self.camera_device_id);
7353        if matches!(version, MavlinkVersion::V2) {
7354            let len = __tmp.len();
7355            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7356        } else {
7357            __tmp.len()
7358        }
7359    }
7360}
7361#[doc = "id: 260"]
7362#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7363#[derive(Debug, Clone, PartialEq)]
7364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7366pub struct CAMERA_SETTINGS_DATA {
7367    #[doc = "Timestamp (time since system boot)."]
7368    pub time_boot_ms: u32,
7369    #[doc = "Camera mode"]
7370    pub mode_id: CameraMode,
7371    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7372    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7373    pub zoomLevel: f32,
7374    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7375    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7376    pub focusLevel: f32,
7377    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7378    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7379    pub camera_device_id: u8,
7380}
7381impl CAMERA_SETTINGS_DATA {
7382    pub const ENCODED_LEN: usize = 14usize;
7383    pub const DEFAULT: Self = Self {
7384        time_boot_ms: 0_u32,
7385        mode_id: CameraMode::DEFAULT,
7386        zoomLevel: 0.0_f32,
7387        focusLevel: 0.0_f32,
7388        camera_device_id: 0_u8,
7389    };
7390    #[cfg(feature = "arbitrary")]
7391    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7392        use arbitrary::{Arbitrary, Unstructured};
7393        let mut buf = [0u8; 1024];
7394        rng.fill_bytes(&mut buf);
7395        let mut unstructured = Unstructured::new(&buf);
7396        Self::arbitrary(&mut unstructured).unwrap_or_default()
7397    }
7398}
7399impl Default for CAMERA_SETTINGS_DATA {
7400    fn default() -> Self {
7401        Self::DEFAULT.clone()
7402    }
7403}
7404impl MessageData for CAMERA_SETTINGS_DATA {
7405    type Message = MavMessage;
7406    const ID: u32 = 260u32;
7407    const NAME: &'static str = "CAMERA_SETTINGS";
7408    const EXTRA_CRC: u8 = 146u8;
7409    const ENCODED_LEN: usize = 14usize;
7410    fn deser(
7411        _version: MavlinkVersion,
7412        __input: &[u8],
7413    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7414        let avail_len = __input.len();
7415        let mut payload_buf = [0; Self::ENCODED_LEN];
7416        let mut buf = if avail_len < Self::ENCODED_LEN {
7417            payload_buf[0..avail_len].copy_from_slice(__input);
7418            Bytes::new(&payload_buf)
7419        } else {
7420            Bytes::new(__input)
7421        };
7422        let mut __struct = Self::default();
7423        __struct.time_boot_ms = buf.get_u32_le();
7424        let tmp = buf.get_u8();
7425        __struct.mode_id =
7426            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7427                enum_type: "CameraMode",
7428                value: tmp as u32,
7429            })?;
7430        __struct.zoomLevel = buf.get_f32_le();
7431        __struct.focusLevel = buf.get_f32_le();
7432        __struct.camera_device_id = buf.get_u8();
7433        Ok(__struct)
7434    }
7435    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7436        let mut __tmp = BytesMut::new(bytes);
7437        #[allow(clippy::absurd_extreme_comparisons)]
7438        #[allow(unused_comparisons)]
7439        if __tmp.remaining() < Self::ENCODED_LEN {
7440            panic!(
7441                "buffer is too small (need {} bytes, but got {})",
7442                Self::ENCODED_LEN,
7443                __tmp.remaining(),
7444            )
7445        }
7446        __tmp.put_u32_le(self.time_boot_ms);
7447        __tmp.put_u8(self.mode_id as u8);
7448        __tmp.put_f32_le(self.zoomLevel);
7449        __tmp.put_f32_le(self.focusLevel);
7450        __tmp.put_u8(self.camera_device_id);
7451        if matches!(version, MavlinkVersion::V2) {
7452            let len = __tmp.len();
7453            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7454        } else {
7455            __tmp.len()
7456        }
7457    }
7458}
7459#[doc = "id: 277"]
7460#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7461#[derive(Debug, Clone, PartialEq)]
7462#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7464pub struct CAMERA_THERMAL_RANGE_DATA {
7465    #[doc = "Timestamp (time since system boot)."]
7466    pub time_boot_ms: u32,
7467    #[doc = "Temperature max."]
7468    pub max: f32,
7469    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7470    pub max_point_x: f32,
7471    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7472    pub max_point_y: f32,
7473    #[doc = "Temperature min."]
7474    pub min: f32,
7475    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7476    pub min_point_x: f32,
7477    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7478    pub min_point_y: f32,
7479    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7480    pub stream_id: u8,
7481    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7482    pub camera_device_id: u8,
7483}
7484impl CAMERA_THERMAL_RANGE_DATA {
7485    pub const ENCODED_LEN: usize = 30usize;
7486    pub const DEFAULT: Self = Self {
7487        time_boot_ms: 0_u32,
7488        max: 0.0_f32,
7489        max_point_x: 0.0_f32,
7490        max_point_y: 0.0_f32,
7491        min: 0.0_f32,
7492        min_point_x: 0.0_f32,
7493        min_point_y: 0.0_f32,
7494        stream_id: 0_u8,
7495        camera_device_id: 0_u8,
7496    };
7497    #[cfg(feature = "arbitrary")]
7498    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7499        use arbitrary::{Arbitrary, Unstructured};
7500        let mut buf = [0u8; 1024];
7501        rng.fill_bytes(&mut buf);
7502        let mut unstructured = Unstructured::new(&buf);
7503        Self::arbitrary(&mut unstructured).unwrap_or_default()
7504    }
7505}
7506impl Default for CAMERA_THERMAL_RANGE_DATA {
7507    fn default() -> Self {
7508        Self::DEFAULT.clone()
7509    }
7510}
7511impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7512    type Message = MavMessage;
7513    const ID: u32 = 277u32;
7514    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7515    const EXTRA_CRC: u8 = 62u8;
7516    const ENCODED_LEN: usize = 30usize;
7517    fn deser(
7518        _version: MavlinkVersion,
7519        __input: &[u8],
7520    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7521        let avail_len = __input.len();
7522        let mut payload_buf = [0; Self::ENCODED_LEN];
7523        let mut buf = if avail_len < Self::ENCODED_LEN {
7524            payload_buf[0..avail_len].copy_from_slice(__input);
7525            Bytes::new(&payload_buf)
7526        } else {
7527            Bytes::new(__input)
7528        };
7529        let mut __struct = Self::default();
7530        __struct.time_boot_ms = buf.get_u32_le();
7531        __struct.max = buf.get_f32_le();
7532        __struct.max_point_x = buf.get_f32_le();
7533        __struct.max_point_y = buf.get_f32_le();
7534        __struct.min = buf.get_f32_le();
7535        __struct.min_point_x = buf.get_f32_le();
7536        __struct.min_point_y = buf.get_f32_le();
7537        __struct.stream_id = buf.get_u8();
7538        __struct.camera_device_id = buf.get_u8();
7539        Ok(__struct)
7540    }
7541    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7542        let mut __tmp = BytesMut::new(bytes);
7543        #[allow(clippy::absurd_extreme_comparisons)]
7544        #[allow(unused_comparisons)]
7545        if __tmp.remaining() < Self::ENCODED_LEN {
7546            panic!(
7547                "buffer is too small (need {} bytes, but got {})",
7548                Self::ENCODED_LEN,
7549                __tmp.remaining(),
7550            )
7551        }
7552        __tmp.put_u32_le(self.time_boot_ms);
7553        __tmp.put_f32_le(self.max);
7554        __tmp.put_f32_le(self.max_point_x);
7555        __tmp.put_f32_le(self.max_point_y);
7556        __tmp.put_f32_le(self.min);
7557        __tmp.put_f32_le(self.min_point_x);
7558        __tmp.put_f32_le(self.min_point_y);
7559        __tmp.put_u8(self.stream_id);
7560        __tmp.put_u8(self.camera_device_id);
7561        if matches!(version, MavlinkVersion::V2) {
7562            let len = __tmp.len();
7563            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7564        } else {
7565            __tmp.len()
7566        }
7567    }
7568}
7569#[doc = "id: 276"]
7570#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7571#[derive(Debug, Clone, PartialEq)]
7572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7573#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7574pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7575    #[doc = "Latitude of tracked object"]
7576    pub lat: i32,
7577    #[doc = "Longitude of tracked object"]
7578    pub lon: i32,
7579    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7580    pub alt: f32,
7581    #[doc = "Horizontal accuracy. NAN if unknown"]
7582    pub h_acc: f32,
7583    #[doc = "Vertical accuracy. NAN if unknown"]
7584    pub v_acc: f32,
7585    #[doc = "North velocity of tracked object. NAN if unknown"]
7586    pub vel_n: f32,
7587    #[doc = "East velocity of tracked object. NAN if unknown"]
7588    pub vel_e: f32,
7589    #[doc = "Down velocity of tracked object. NAN if unknown"]
7590    pub vel_d: f32,
7591    #[doc = "Velocity accuracy. NAN if unknown"]
7592    pub vel_acc: f32,
7593    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7594    pub dist: f32,
7595    #[doc = "Heading in radians, in NED. NAN if unknown"]
7596    pub hdg: f32,
7597    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7598    pub hdg_acc: f32,
7599    #[doc = "Current tracking status"]
7600    pub tracking_status: CameraTrackingStatusFlags,
7601    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7602    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7603    pub camera_device_id: u8,
7604}
7605impl CAMERA_TRACKING_GEO_STATUS_DATA {
7606    pub const ENCODED_LEN: usize = 50usize;
7607    pub const DEFAULT: Self = Self {
7608        lat: 0_i32,
7609        lon: 0_i32,
7610        alt: 0.0_f32,
7611        h_acc: 0.0_f32,
7612        v_acc: 0.0_f32,
7613        vel_n: 0.0_f32,
7614        vel_e: 0.0_f32,
7615        vel_d: 0.0_f32,
7616        vel_acc: 0.0_f32,
7617        dist: 0.0_f32,
7618        hdg: 0.0_f32,
7619        hdg_acc: 0.0_f32,
7620        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7621        camera_device_id: 0_u8,
7622    };
7623    #[cfg(feature = "arbitrary")]
7624    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7625        use arbitrary::{Arbitrary, Unstructured};
7626        let mut buf = [0u8; 1024];
7627        rng.fill_bytes(&mut buf);
7628        let mut unstructured = Unstructured::new(&buf);
7629        Self::arbitrary(&mut unstructured).unwrap_or_default()
7630    }
7631}
7632impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7633    fn default() -> Self {
7634        Self::DEFAULT.clone()
7635    }
7636}
7637impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7638    type Message = MavMessage;
7639    const ID: u32 = 276u32;
7640    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7641    const EXTRA_CRC: u8 = 18u8;
7642    const ENCODED_LEN: usize = 50usize;
7643    fn deser(
7644        _version: MavlinkVersion,
7645        __input: &[u8],
7646    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7647        let avail_len = __input.len();
7648        let mut payload_buf = [0; Self::ENCODED_LEN];
7649        let mut buf = if avail_len < Self::ENCODED_LEN {
7650            payload_buf[0..avail_len].copy_from_slice(__input);
7651            Bytes::new(&payload_buf)
7652        } else {
7653            Bytes::new(__input)
7654        };
7655        let mut __struct = Self::default();
7656        __struct.lat = buf.get_i32_le();
7657        __struct.lon = buf.get_i32_le();
7658        __struct.alt = buf.get_f32_le();
7659        __struct.h_acc = buf.get_f32_le();
7660        __struct.v_acc = buf.get_f32_le();
7661        __struct.vel_n = buf.get_f32_le();
7662        __struct.vel_e = buf.get_f32_le();
7663        __struct.vel_d = buf.get_f32_le();
7664        __struct.vel_acc = buf.get_f32_le();
7665        __struct.dist = buf.get_f32_le();
7666        __struct.hdg = buf.get_f32_le();
7667        __struct.hdg_acc = buf.get_f32_le();
7668        let tmp = buf.get_u8();
7669        __struct.tracking_status =
7670            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7671                enum_type: "CameraTrackingStatusFlags",
7672                value: tmp as u32,
7673            })?;
7674        __struct.camera_device_id = buf.get_u8();
7675        Ok(__struct)
7676    }
7677    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7678        let mut __tmp = BytesMut::new(bytes);
7679        #[allow(clippy::absurd_extreme_comparisons)]
7680        #[allow(unused_comparisons)]
7681        if __tmp.remaining() < Self::ENCODED_LEN {
7682            panic!(
7683                "buffer is too small (need {} bytes, but got {})",
7684                Self::ENCODED_LEN,
7685                __tmp.remaining(),
7686            )
7687        }
7688        __tmp.put_i32_le(self.lat);
7689        __tmp.put_i32_le(self.lon);
7690        __tmp.put_f32_le(self.alt);
7691        __tmp.put_f32_le(self.h_acc);
7692        __tmp.put_f32_le(self.v_acc);
7693        __tmp.put_f32_le(self.vel_n);
7694        __tmp.put_f32_le(self.vel_e);
7695        __tmp.put_f32_le(self.vel_d);
7696        __tmp.put_f32_le(self.vel_acc);
7697        __tmp.put_f32_le(self.dist);
7698        __tmp.put_f32_le(self.hdg);
7699        __tmp.put_f32_le(self.hdg_acc);
7700        __tmp.put_u8(self.tracking_status as u8);
7701        __tmp.put_u8(self.camera_device_id);
7702        if matches!(version, MavlinkVersion::V2) {
7703            let len = __tmp.len();
7704            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7705        } else {
7706            __tmp.len()
7707        }
7708    }
7709}
7710#[doc = "id: 275"]
7711#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7712#[derive(Debug, Clone, PartialEq)]
7713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7715pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
7716    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7717    pub point_x: f32,
7718    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7719    pub point_y: f32,
7720    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
7721    pub radius: f32,
7722    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7723    pub rec_top_x: f32,
7724    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7725    pub rec_top_y: f32,
7726    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7727    pub rec_bottom_x: f32,
7728    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7729    pub rec_bottom_y: f32,
7730    #[doc = "Current tracking status"]
7731    pub tracking_status: CameraTrackingStatusFlags,
7732    #[doc = "Current tracking mode"]
7733    pub tracking_mode: CameraTrackingMode,
7734    #[doc = "Defines location of target data"]
7735    pub target_data: CameraTrackingTargetData,
7736    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7737    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7738    pub camera_device_id: u8,
7739}
7740impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
7741    pub const ENCODED_LEN: usize = 32usize;
7742    pub const DEFAULT: Self = Self {
7743        point_x: 0.0_f32,
7744        point_y: 0.0_f32,
7745        radius: 0.0_f32,
7746        rec_top_x: 0.0_f32,
7747        rec_top_y: 0.0_f32,
7748        rec_bottom_x: 0.0_f32,
7749        rec_bottom_y: 0.0_f32,
7750        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7751        tracking_mode: CameraTrackingMode::DEFAULT,
7752        target_data: CameraTrackingTargetData::DEFAULT,
7753        camera_device_id: 0_u8,
7754    };
7755    #[cfg(feature = "arbitrary")]
7756    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7757        use arbitrary::{Arbitrary, Unstructured};
7758        let mut buf = [0u8; 1024];
7759        rng.fill_bytes(&mut buf);
7760        let mut unstructured = Unstructured::new(&buf);
7761        Self::arbitrary(&mut unstructured).unwrap_or_default()
7762    }
7763}
7764impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7765    fn default() -> Self {
7766        Self::DEFAULT.clone()
7767    }
7768}
7769impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7770    type Message = MavMessage;
7771    const ID: u32 = 275u32;
7772    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
7773    const EXTRA_CRC: u8 = 126u8;
7774    const ENCODED_LEN: usize = 32usize;
7775    fn deser(
7776        _version: MavlinkVersion,
7777        __input: &[u8],
7778    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7779        let avail_len = __input.len();
7780        let mut payload_buf = [0; Self::ENCODED_LEN];
7781        let mut buf = if avail_len < Self::ENCODED_LEN {
7782            payload_buf[0..avail_len].copy_from_slice(__input);
7783            Bytes::new(&payload_buf)
7784        } else {
7785            Bytes::new(__input)
7786        };
7787        let mut __struct = Self::default();
7788        __struct.point_x = buf.get_f32_le();
7789        __struct.point_y = buf.get_f32_le();
7790        __struct.radius = buf.get_f32_le();
7791        __struct.rec_top_x = buf.get_f32_le();
7792        __struct.rec_top_y = buf.get_f32_le();
7793        __struct.rec_bottom_x = buf.get_f32_le();
7794        __struct.rec_bottom_y = buf.get_f32_le();
7795        let tmp = buf.get_u8();
7796        __struct.tracking_status =
7797            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7798                enum_type: "CameraTrackingStatusFlags",
7799                value: tmp as u32,
7800            })?;
7801        let tmp = buf.get_u8();
7802        __struct.tracking_mode =
7803            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7804                enum_type: "CameraTrackingMode",
7805                value: tmp as u32,
7806            })?;
7807        let tmp = buf.get_u8();
7808        __struct.target_data =
7809            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
7810                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7811                    flag_type: "CameraTrackingTargetData",
7812                    value: tmp as u32,
7813                })?;
7814        __struct.camera_device_id = buf.get_u8();
7815        Ok(__struct)
7816    }
7817    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7818        let mut __tmp = BytesMut::new(bytes);
7819        #[allow(clippy::absurd_extreme_comparisons)]
7820        #[allow(unused_comparisons)]
7821        if __tmp.remaining() < Self::ENCODED_LEN {
7822            panic!(
7823                "buffer is too small (need {} bytes, but got {})",
7824                Self::ENCODED_LEN,
7825                __tmp.remaining(),
7826            )
7827        }
7828        __tmp.put_f32_le(self.point_x);
7829        __tmp.put_f32_le(self.point_y);
7830        __tmp.put_f32_le(self.radius);
7831        __tmp.put_f32_le(self.rec_top_x);
7832        __tmp.put_f32_le(self.rec_top_y);
7833        __tmp.put_f32_le(self.rec_bottom_x);
7834        __tmp.put_f32_le(self.rec_bottom_y);
7835        __tmp.put_u8(self.tracking_status as u8);
7836        __tmp.put_u8(self.tracking_mode as u8);
7837        __tmp.put_u8(self.target_data.bits());
7838        __tmp.put_u8(self.camera_device_id);
7839        if matches!(version, MavlinkVersion::V2) {
7840            let len = __tmp.len();
7841            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7842        } else {
7843            __tmp.len()
7844        }
7845    }
7846}
7847#[doc = "id: 112"]
7848#[doc = "Camera-IMU triggering and synchronisation message."]
7849#[derive(Debug, Clone, PartialEq)]
7850#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7851#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7852pub struct CAMERA_TRIGGER_DATA {
7853    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7854    pub time_usec: u64,
7855    #[doc = "Image frame sequence"]
7856    pub seq: u32,
7857}
7858impl CAMERA_TRIGGER_DATA {
7859    pub const ENCODED_LEN: usize = 12usize;
7860    pub const DEFAULT: Self = Self {
7861        time_usec: 0_u64,
7862        seq: 0_u32,
7863    };
7864    #[cfg(feature = "arbitrary")]
7865    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7866        use arbitrary::{Arbitrary, Unstructured};
7867        let mut buf = [0u8; 1024];
7868        rng.fill_bytes(&mut buf);
7869        let mut unstructured = Unstructured::new(&buf);
7870        Self::arbitrary(&mut unstructured).unwrap_or_default()
7871    }
7872}
7873impl Default for CAMERA_TRIGGER_DATA {
7874    fn default() -> Self {
7875        Self::DEFAULT.clone()
7876    }
7877}
7878impl MessageData for CAMERA_TRIGGER_DATA {
7879    type Message = MavMessage;
7880    const ID: u32 = 112u32;
7881    const NAME: &'static str = "CAMERA_TRIGGER";
7882    const EXTRA_CRC: u8 = 174u8;
7883    const ENCODED_LEN: usize = 12usize;
7884    fn deser(
7885        _version: MavlinkVersion,
7886        __input: &[u8],
7887    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7888        let avail_len = __input.len();
7889        let mut payload_buf = [0; Self::ENCODED_LEN];
7890        let mut buf = if avail_len < Self::ENCODED_LEN {
7891            payload_buf[0..avail_len].copy_from_slice(__input);
7892            Bytes::new(&payload_buf)
7893        } else {
7894            Bytes::new(__input)
7895        };
7896        let mut __struct = Self::default();
7897        __struct.time_usec = buf.get_u64_le();
7898        __struct.seq = buf.get_u32_le();
7899        Ok(__struct)
7900    }
7901    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7902        let mut __tmp = BytesMut::new(bytes);
7903        #[allow(clippy::absurd_extreme_comparisons)]
7904        #[allow(unused_comparisons)]
7905        if __tmp.remaining() < Self::ENCODED_LEN {
7906            panic!(
7907                "buffer is too small (need {} bytes, but got {})",
7908                Self::ENCODED_LEN,
7909                __tmp.remaining(),
7910            )
7911        }
7912        __tmp.put_u64_le(self.time_usec);
7913        __tmp.put_u32_le(self.seq);
7914        if matches!(version, MavlinkVersion::V2) {
7915            let len = __tmp.len();
7916            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7917        } else {
7918            __tmp.len()
7919        }
7920    }
7921}
7922#[doc = "id: 387"]
7923#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
7924#[derive(Debug, Clone, PartialEq)]
7925#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7926#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7927pub struct CANFD_FRAME_DATA {
7928    #[doc = "Frame ID"]
7929    pub id: u32,
7930    #[doc = "System ID."]
7931    pub target_system: u8,
7932    #[doc = "Component ID."]
7933    pub target_component: u8,
7934    #[doc = "bus number"]
7935    pub bus: u8,
7936    #[doc = "Frame length"]
7937    pub len: u8,
7938    #[doc = "Frame data"]
7939    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7940    pub data: [u8; 64],
7941}
7942impl CANFD_FRAME_DATA {
7943    pub const ENCODED_LEN: usize = 72usize;
7944    pub const DEFAULT: Self = Self {
7945        id: 0_u32,
7946        target_system: 0_u8,
7947        target_component: 0_u8,
7948        bus: 0_u8,
7949        len: 0_u8,
7950        data: [0_u8; 64usize],
7951    };
7952    #[cfg(feature = "arbitrary")]
7953    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7954        use arbitrary::{Arbitrary, Unstructured};
7955        let mut buf = [0u8; 1024];
7956        rng.fill_bytes(&mut buf);
7957        let mut unstructured = Unstructured::new(&buf);
7958        Self::arbitrary(&mut unstructured).unwrap_or_default()
7959    }
7960}
7961impl Default for CANFD_FRAME_DATA {
7962    fn default() -> Self {
7963        Self::DEFAULT.clone()
7964    }
7965}
7966impl MessageData for CANFD_FRAME_DATA {
7967    type Message = MavMessage;
7968    const ID: u32 = 387u32;
7969    const NAME: &'static str = "CANFD_FRAME";
7970    const EXTRA_CRC: u8 = 4u8;
7971    const ENCODED_LEN: usize = 72usize;
7972    fn deser(
7973        _version: MavlinkVersion,
7974        __input: &[u8],
7975    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7976        let avail_len = __input.len();
7977        let mut payload_buf = [0; Self::ENCODED_LEN];
7978        let mut buf = if avail_len < Self::ENCODED_LEN {
7979            payload_buf[0..avail_len].copy_from_slice(__input);
7980            Bytes::new(&payload_buf)
7981        } else {
7982            Bytes::new(__input)
7983        };
7984        let mut __struct = Self::default();
7985        __struct.id = buf.get_u32_le();
7986        __struct.target_system = buf.get_u8();
7987        __struct.target_component = buf.get_u8();
7988        __struct.bus = buf.get_u8();
7989        __struct.len = buf.get_u8();
7990        for v in &mut __struct.data {
7991            let val = buf.get_u8();
7992            *v = val;
7993        }
7994        Ok(__struct)
7995    }
7996    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7997        let mut __tmp = BytesMut::new(bytes);
7998        #[allow(clippy::absurd_extreme_comparisons)]
7999        #[allow(unused_comparisons)]
8000        if __tmp.remaining() < Self::ENCODED_LEN {
8001            panic!(
8002                "buffer is too small (need {} bytes, but got {})",
8003                Self::ENCODED_LEN,
8004                __tmp.remaining(),
8005            )
8006        }
8007        __tmp.put_u32_le(self.id);
8008        __tmp.put_u8(self.target_system);
8009        __tmp.put_u8(self.target_component);
8010        __tmp.put_u8(self.bus);
8011        __tmp.put_u8(self.len);
8012        for val in &self.data {
8013            __tmp.put_u8(*val);
8014        }
8015        if matches!(version, MavlinkVersion::V2) {
8016            let len = __tmp.len();
8017            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8018        } else {
8019            __tmp.len()
8020        }
8021    }
8022}
8023#[doc = "id: 388"]
8024#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8025#[derive(Debug, Clone, PartialEq)]
8026#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8027#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8028pub struct CAN_FILTER_MODIFY_DATA {
8029    #[doc = "filter IDs, length num_ids"]
8030    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8031    pub ids: [u16; 16],
8032    #[doc = "System ID."]
8033    pub target_system: u8,
8034    #[doc = "Component ID."]
8035    pub target_component: u8,
8036    #[doc = "bus number"]
8037    pub bus: u8,
8038    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8039    pub operation: CanFilterOp,
8040    #[doc = "number of IDs in filter list"]
8041    pub num_ids: u8,
8042}
8043impl CAN_FILTER_MODIFY_DATA {
8044    pub const ENCODED_LEN: usize = 37usize;
8045    pub const DEFAULT: Self = Self {
8046        ids: [0_u16; 16usize],
8047        target_system: 0_u8,
8048        target_component: 0_u8,
8049        bus: 0_u8,
8050        operation: CanFilterOp::DEFAULT,
8051        num_ids: 0_u8,
8052    };
8053    #[cfg(feature = "arbitrary")]
8054    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8055        use arbitrary::{Arbitrary, Unstructured};
8056        let mut buf = [0u8; 1024];
8057        rng.fill_bytes(&mut buf);
8058        let mut unstructured = Unstructured::new(&buf);
8059        Self::arbitrary(&mut unstructured).unwrap_or_default()
8060    }
8061}
8062impl Default for CAN_FILTER_MODIFY_DATA {
8063    fn default() -> Self {
8064        Self::DEFAULT.clone()
8065    }
8066}
8067impl MessageData for CAN_FILTER_MODIFY_DATA {
8068    type Message = MavMessage;
8069    const ID: u32 = 388u32;
8070    const NAME: &'static str = "CAN_FILTER_MODIFY";
8071    const EXTRA_CRC: u8 = 8u8;
8072    const ENCODED_LEN: usize = 37usize;
8073    fn deser(
8074        _version: MavlinkVersion,
8075        __input: &[u8],
8076    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8077        let avail_len = __input.len();
8078        let mut payload_buf = [0; Self::ENCODED_LEN];
8079        let mut buf = if avail_len < Self::ENCODED_LEN {
8080            payload_buf[0..avail_len].copy_from_slice(__input);
8081            Bytes::new(&payload_buf)
8082        } else {
8083            Bytes::new(__input)
8084        };
8085        let mut __struct = Self::default();
8086        for v in &mut __struct.ids {
8087            let val = buf.get_u16_le();
8088            *v = val;
8089        }
8090        __struct.target_system = buf.get_u8();
8091        __struct.target_component = buf.get_u8();
8092        __struct.bus = buf.get_u8();
8093        let tmp = buf.get_u8();
8094        __struct.operation =
8095            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8096                enum_type: "CanFilterOp",
8097                value: tmp as u32,
8098            })?;
8099        __struct.num_ids = buf.get_u8();
8100        Ok(__struct)
8101    }
8102    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8103        let mut __tmp = BytesMut::new(bytes);
8104        #[allow(clippy::absurd_extreme_comparisons)]
8105        #[allow(unused_comparisons)]
8106        if __tmp.remaining() < Self::ENCODED_LEN {
8107            panic!(
8108                "buffer is too small (need {} bytes, but got {})",
8109                Self::ENCODED_LEN,
8110                __tmp.remaining(),
8111            )
8112        }
8113        for val in &self.ids {
8114            __tmp.put_u16_le(*val);
8115        }
8116        __tmp.put_u8(self.target_system);
8117        __tmp.put_u8(self.target_component);
8118        __tmp.put_u8(self.bus);
8119        __tmp.put_u8(self.operation as u8);
8120        __tmp.put_u8(self.num_ids);
8121        if matches!(version, MavlinkVersion::V2) {
8122            let len = __tmp.len();
8123            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8124        } else {
8125            __tmp.len()
8126        }
8127    }
8128}
8129#[doc = "id: 386"]
8130#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8131#[derive(Debug, Clone, PartialEq)]
8132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8133#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8134pub struct CAN_FRAME_DATA {
8135    #[doc = "Frame ID"]
8136    pub id: u32,
8137    #[doc = "System ID."]
8138    pub target_system: u8,
8139    #[doc = "Component ID."]
8140    pub target_component: u8,
8141    #[doc = "Bus number"]
8142    pub bus: u8,
8143    #[doc = "Frame length"]
8144    pub len: u8,
8145    #[doc = "Frame data"]
8146    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8147    pub data: [u8; 8],
8148}
8149impl CAN_FRAME_DATA {
8150    pub const ENCODED_LEN: usize = 16usize;
8151    pub const DEFAULT: Self = Self {
8152        id: 0_u32,
8153        target_system: 0_u8,
8154        target_component: 0_u8,
8155        bus: 0_u8,
8156        len: 0_u8,
8157        data: [0_u8; 8usize],
8158    };
8159    #[cfg(feature = "arbitrary")]
8160    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8161        use arbitrary::{Arbitrary, Unstructured};
8162        let mut buf = [0u8; 1024];
8163        rng.fill_bytes(&mut buf);
8164        let mut unstructured = Unstructured::new(&buf);
8165        Self::arbitrary(&mut unstructured).unwrap_or_default()
8166    }
8167}
8168impl Default for CAN_FRAME_DATA {
8169    fn default() -> Self {
8170        Self::DEFAULT.clone()
8171    }
8172}
8173impl MessageData for CAN_FRAME_DATA {
8174    type Message = MavMessage;
8175    const ID: u32 = 386u32;
8176    const NAME: &'static str = "CAN_FRAME";
8177    const EXTRA_CRC: u8 = 132u8;
8178    const ENCODED_LEN: usize = 16usize;
8179    fn deser(
8180        _version: MavlinkVersion,
8181        __input: &[u8],
8182    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8183        let avail_len = __input.len();
8184        let mut payload_buf = [0; Self::ENCODED_LEN];
8185        let mut buf = if avail_len < Self::ENCODED_LEN {
8186            payload_buf[0..avail_len].copy_from_slice(__input);
8187            Bytes::new(&payload_buf)
8188        } else {
8189            Bytes::new(__input)
8190        };
8191        let mut __struct = Self::default();
8192        __struct.id = buf.get_u32_le();
8193        __struct.target_system = buf.get_u8();
8194        __struct.target_component = buf.get_u8();
8195        __struct.bus = buf.get_u8();
8196        __struct.len = buf.get_u8();
8197        for v in &mut __struct.data {
8198            let val = buf.get_u8();
8199            *v = val;
8200        }
8201        Ok(__struct)
8202    }
8203    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8204        let mut __tmp = BytesMut::new(bytes);
8205        #[allow(clippy::absurd_extreme_comparisons)]
8206        #[allow(unused_comparisons)]
8207        if __tmp.remaining() < Self::ENCODED_LEN {
8208            panic!(
8209                "buffer is too small (need {} bytes, but got {})",
8210                Self::ENCODED_LEN,
8211                __tmp.remaining(),
8212            )
8213        }
8214        __tmp.put_u32_le(self.id);
8215        __tmp.put_u8(self.target_system);
8216        __tmp.put_u8(self.target_component);
8217        __tmp.put_u8(self.bus);
8218        __tmp.put_u8(self.len);
8219        for val in &self.data {
8220            __tmp.put_u8(*val);
8221        }
8222        if matches!(version, MavlinkVersion::V2) {
8223            let len = __tmp.len();
8224            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8225        } else {
8226            __tmp.len()
8227        }
8228    }
8229}
8230#[doc = "id: 336"]
8231#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8232#[derive(Debug, Clone, PartialEq)]
8233#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8234#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8235pub struct CELLULAR_CONFIG_DATA {
8236    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8237    pub enable_lte: u8,
8238    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8239    pub enable_pin: u8,
8240    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8241    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8242    pub pin: [u8; 16],
8243    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8244    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8245    pub new_pin: [u8; 16],
8246    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8247    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8248    pub apn: [u8; 32],
8249    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8250    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8251    pub puk: [u8; 16],
8252    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8253    pub roaming: u8,
8254    #[doc = "Message acceptance response (sent back to GS)."]
8255    pub response: CellularConfigResponse,
8256}
8257impl CELLULAR_CONFIG_DATA {
8258    pub const ENCODED_LEN: usize = 84usize;
8259    pub const DEFAULT: Self = Self {
8260        enable_lte: 0_u8,
8261        enable_pin: 0_u8,
8262        pin: [0_u8; 16usize],
8263        new_pin: [0_u8; 16usize],
8264        apn: [0_u8; 32usize],
8265        puk: [0_u8; 16usize],
8266        roaming: 0_u8,
8267        response: CellularConfigResponse::DEFAULT,
8268    };
8269    #[cfg(feature = "arbitrary")]
8270    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8271        use arbitrary::{Arbitrary, Unstructured};
8272        let mut buf = [0u8; 1024];
8273        rng.fill_bytes(&mut buf);
8274        let mut unstructured = Unstructured::new(&buf);
8275        Self::arbitrary(&mut unstructured).unwrap_or_default()
8276    }
8277}
8278impl Default for CELLULAR_CONFIG_DATA {
8279    fn default() -> Self {
8280        Self::DEFAULT.clone()
8281    }
8282}
8283impl MessageData for CELLULAR_CONFIG_DATA {
8284    type Message = MavMessage;
8285    const ID: u32 = 336u32;
8286    const NAME: &'static str = "CELLULAR_CONFIG";
8287    const EXTRA_CRC: u8 = 245u8;
8288    const ENCODED_LEN: usize = 84usize;
8289    fn deser(
8290        _version: MavlinkVersion,
8291        __input: &[u8],
8292    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8293        let avail_len = __input.len();
8294        let mut payload_buf = [0; Self::ENCODED_LEN];
8295        let mut buf = if avail_len < Self::ENCODED_LEN {
8296            payload_buf[0..avail_len].copy_from_slice(__input);
8297            Bytes::new(&payload_buf)
8298        } else {
8299            Bytes::new(__input)
8300        };
8301        let mut __struct = Self::default();
8302        __struct.enable_lte = buf.get_u8();
8303        __struct.enable_pin = buf.get_u8();
8304        for v in &mut __struct.pin {
8305            let val = buf.get_u8();
8306            *v = val;
8307        }
8308        for v in &mut __struct.new_pin {
8309            let val = buf.get_u8();
8310            *v = val;
8311        }
8312        for v in &mut __struct.apn {
8313            let val = buf.get_u8();
8314            *v = val;
8315        }
8316        for v in &mut __struct.puk {
8317            let val = buf.get_u8();
8318            *v = val;
8319        }
8320        __struct.roaming = buf.get_u8();
8321        let tmp = buf.get_u8();
8322        __struct.response =
8323            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8324                enum_type: "CellularConfigResponse",
8325                value: tmp as u32,
8326            })?;
8327        Ok(__struct)
8328    }
8329    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8330        let mut __tmp = BytesMut::new(bytes);
8331        #[allow(clippy::absurd_extreme_comparisons)]
8332        #[allow(unused_comparisons)]
8333        if __tmp.remaining() < Self::ENCODED_LEN {
8334            panic!(
8335                "buffer is too small (need {} bytes, but got {})",
8336                Self::ENCODED_LEN,
8337                __tmp.remaining(),
8338            )
8339        }
8340        __tmp.put_u8(self.enable_lte);
8341        __tmp.put_u8(self.enable_pin);
8342        for val in &self.pin {
8343            __tmp.put_u8(*val);
8344        }
8345        for val in &self.new_pin {
8346            __tmp.put_u8(*val);
8347        }
8348        for val in &self.apn {
8349            __tmp.put_u8(*val);
8350        }
8351        for val in &self.puk {
8352            __tmp.put_u8(*val);
8353        }
8354        __tmp.put_u8(self.roaming);
8355        __tmp.put_u8(self.response as u8);
8356        if matches!(version, MavlinkVersion::V2) {
8357            let len = __tmp.len();
8358            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8359        } else {
8360            __tmp.len()
8361        }
8362    }
8363}
8364#[doc = "id: 334"]
8365#[doc = "Report current used cellular network status."]
8366#[derive(Debug, Clone, PartialEq)]
8367#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8368#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8369pub struct CELLULAR_STATUS_DATA {
8370    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8371    pub mcc: u16,
8372    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8373    pub mnc: u16,
8374    #[doc = "Location area code. If unknown, set to 0"]
8375    pub lac: u16,
8376    #[doc = "Cellular modem status"]
8377    pub status: CellularStatusFlag,
8378    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8379    pub failure_reason: CellularNetworkFailedReason,
8380    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8381    pub mavtype: CellularNetworkRadioType,
8382    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8383    pub quality: u8,
8384}
8385impl CELLULAR_STATUS_DATA {
8386    pub const ENCODED_LEN: usize = 10usize;
8387    pub const DEFAULT: Self = Self {
8388        mcc: 0_u16,
8389        mnc: 0_u16,
8390        lac: 0_u16,
8391        status: CellularStatusFlag::DEFAULT,
8392        failure_reason: CellularNetworkFailedReason::DEFAULT,
8393        mavtype: CellularNetworkRadioType::DEFAULT,
8394        quality: 0_u8,
8395    };
8396    #[cfg(feature = "arbitrary")]
8397    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8398        use arbitrary::{Arbitrary, Unstructured};
8399        let mut buf = [0u8; 1024];
8400        rng.fill_bytes(&mut buf);
8401        let mut unstructured = Unstructured::new(&buf);
8402        Self::arbitrary(&mut unstructured).unwrap_or_default()
8403    }
8404}
8405impl Default for CELLULAR_STATUS_DATA {
8406    fn default() -> Self {
8407        Self::DEFAULT.clone()
8408    }
8409}
8410impl MessageData for CELLULAR_STATUS_DATA {
8411    type Message = MavMessage;
8412    const ID: u32 = 334u32;
8413    const NAME: &'static str = "CELLULAR_STATUS";
8414    const EXTRA_CRC: u8 = 72u8;
8415    const ENCODED_LEN: usize = 10usize;
8416    fn deser(
8417        _version: MavlinkVersion,
8418        __input: &[u8],
8419    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8420        let avail_len = __input.len();
8421        let mut payload_buf = [0; Self::ENCODED_LEN];
8422        let mut buf = if avail_len < Self::ENCODED_LEN {
8423            payload_buf[0..avail_len].copy_from_slice(__input);
8424            Bytes::new(&payload_buf)
8425        } else {
8426            Bytes::new(__input)
8427        };
8428        let mut __struct = Self::default();
8429        __struct.mcc = buf.get_u16_le();
8430        __struct.mnc = buf.get_u16_le();
8431        __struct.lac = buf.get_u16_le();
8432        let tmp = buf.get_u8();
8433        __struct.status =
8434            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8435                enum_type: "CellularStatusFlag",
8436                value: tmp as u32,
8437            })?;
8438        let tmp = buf.get_u8();
8439        __struct.failure_reason =
8440            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8441                enum_type: "CellularNetworkFailedReason",
8442                value: tmp as u32,
8443            })?;
8444        let tmp = buf.get_u8();
8445        __struct.mavtype =
8446            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8447                enum_type: "CellularNetworkRadioType",
8448                value: tmp as u32,
8449            })?;
8450        __struct.quality = buf.get_u8();
8451        Ok(__struct)
8452    }
8453    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8454        let mut __tmp = BytesMut::new(bytes);
8455        #[allow(clippy::absurd_extreme_comparisons)]
8456        #[allow(unused_comparisons)]
8457        if __tmp.remaining() < Self::ENCODED_LEN {
8458            panic!(
8459                "buffer is too small (need {} bytes, but got {})",
8460                Self::ENCODED_LEN,
8461                __tmp.remaining(),
8462            )
8463        }
8464        __tmp.put_u16_le(self.mcc);
8465        __tmp.put_u16_le(self.mnc);
8466        __tmp.put_u16_le(self.lac);
8467        __tmp.put_u8(self.status as u8);
8468        __tmp.put_u8(self.failure_reason as u8);
8469        __tmp.put_u8(self.mavtype as u8);
8470        __tmp.put_u8(self.quality);
8471        if matches!(version, MavlinkVersion::V2) {
8472            let len = __tmp.len();
8473            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8474        } else {
8475            __tmp.len()
8476        }
8477    }
8478}
8479#[doc = "id: 5"]
8480#[doc = "Request to control this MAV."]
8481#[derive(Debug, Clone, PartialEq)]
8482#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8483#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8484pub struct CHANGE_OPERATOR_CONTROL_DATA {
8485    #[doc = "System the GCS requests control for"]
8486    pub target_system: u8,
8487    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8488    pub control_request: u8,
8489    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8490    pub version: u8,
8491    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8492    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8493    pub passkey: [u8; 25],
8494}
8495impl CHANGE_OPERATOR_CONTROL_DATA {
8496    pub const ENCODED_LEN: usize = 28usize;
8497    pub const DEFAULT: Self = Self {
8498        target_system: 0_u8,
8499        control_request: 0_u8,
8500        version: 0_u8,
8501        passkey: [0_u8; 25usize],
8502    };
8503    #[cfg(feature = "arbitrary")]
8504    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8505        use arbitrary::{Arbitrary, Unstructured};
8506        let mut buf = [0u8; 1024];
8507        rng.fill_bytes(&mut buf);
8508        let mut unstructured = Unstructured::new(&buf);
8509        Self::arbitrary(&mut unstructured).unwrap_or_default()
8510    }
8511}
8512impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8513    fn default() -> Self {
8514        Self::DEFAULT.clone()
8515    }
8516}
8517impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8518    type Message = MavMessage;
8519    const ID: u32 = 5u32;
8520    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8521    const EXTRA_CRC: u8 = 217u8;
8522    const ENCODED_LEN: usize = 28usize;
8523    fn deser(
8524        _version: MavlinkVersion,
8525        __input: &[u8],
8526    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8527        let avail_len = __input.len();
8528        let mut payload_buf = [0; Self::ENCODED_LEN];
8529        let mut buf = if avail_len < Self::ENCODED_LEN {
8530            payload_buf[0..avail_len].copy_from_slice(__input);
8531            Bytes::new(&payload_buf)
8532        } else {
8533            Bytes::new(__input)
8534        };
8535        let mut __struct = Self::default();
8536        __struct.target_system = buf.get_u8();
8537        __struct.control_request = buf.get_u8();
8538        __struct.version = buf.get_u8();
8539        for v in &mut __struct.passkey {
8540            let val = buf.get_u8();
8541            *v = val;
8542        }
8543        Ok(__struct)
8544    }
8545    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8546        let mut __tmp = BytesMut::new(bytes);
8547        #[allow(clippy::absurd_extreme_comparisons)]
8548        #[allow(unused_comparisons)]
8549        if __tmp.remaining() < Self::ENCODED_LEN {
8550            panic!(
8551                "buffer is too small (need {} bytes, but got {})",
8552                Self::ENCODED_LEN,
8553                __tmp.remaining(),
8554            )
8555        }
8556        __tmp.put_u8(self.target_system);
8557        __tmp.put_u8(self.control_request);
8558        __tmp.put_u8(self.version);
8559        for val in &self.passkey {
8560            __tmp.put_u8(*val);
8561        }
8562        if matches!(version, MavlinkVersion::V2) {
8563            let len = __tmp.len();
8564            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8565        } else {
8566            __tmp.len()
8567        }
8568    }
8569}
8570#[doc = "id: 6"]
8571#[doc = "Accept / deny control of this MAV."]
8572#[derive(Debug, Clone, PartialEq)]
8573#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8574#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8575pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8576    #[doc = "ID of the GCS this message"]
8577    pub gcs_system_id: u8,
8578    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8579    pub control_request: u8,
8580    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8581    pub ack: u8,
8582}
8583impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8584    pub const ENCODED_LEN: usize = 3usize;
8585    pub const DEFAULT: Self = Self {
8586        gcs_system_id: 0_u8,
8587        control_request: 0_u8,
8588        ack: 0_u8,
8589    };
8590    #[cfg(feature = "arbitrary")]
8591    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8592        use arbitrary::{Arbitrary, Unstructured};
8593        let mut buf = [0u8; 1024];
8594        rng.fill_bytes(&mut buf);
8595        let mut unstructured = Unstructured::new(&buf);
8596        Self::arbitrary(&mut unstructured).unwrap_or_default()
8597    }
8598}
8599impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8600    fn default() -> Self {
8601        Self::DEFAULT.clone()
8602    }
8603}
8604impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8605    type Message = MavMessage;
8606    const ID: u32 = 6u32;
8607    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8608    const EXTRA_CRC: u8 = 104u8;
8609    const ENCODED_LEN: usize = 3usize;
8610    fn deser(
8611        _version: MavlinkVersion,
8612        __input: &[u8],
8613    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8614        let avail_len = __input.len();
8615        let mut payload_buf = [0; Self::ENCODED_LEN];
8616        let mut buf = if avail_len < Self::ENCODED_LEN {
8617            payload_buf[0..avail_len].copy_from_slice(__input);
8618            Bytes::new(&payload_buf)
8619        } else {
8620            Bytes::new(__input)
8621        };
8622        let mut __struct = Self::default();
8623        __struct.gcs_system_id = buf.get_u8();
8624        __struct.control_request = buf.get_u8();
8625        __struct.ack = buf.get_u8();
8626        Ok(__struct)
8627    }
8628    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8629        let mut __tmp = BytesMut::new(bytes);
8630        #[allow(clippy::absurd_extreme_comparisons)]
8631        #[allow(unused_comparisons)]
8632        if __tmp.remaining() < Self::ENCODED_LEN {
8633            panic!(
8634                "buffer is too small (need {} bytes, but got {})",
8635                Self::ENCODED_LEN,
8636                __tmp.remaining(),
8637            )
8638        }
8639        __tmp.put_u8(self.gcs_system_id);
8640        __tmp.put_u8(self.control_request);
8641        __tmp.put_u8(self.ack);
8642        if matches!(version, MavlinkVersion::V2) {
8643            let len = __tmp.len();
8644            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8645        } else {
8646            __tmp.len()
8647        }
8648    }
8649}
8650#[doc = "id: 247"]
8651#[doc = "Information about a potential collision."]
8652#[derive(Debug, Clone, PartialEq)]
8653#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8654#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8655pub struct COLLISION_DATA {
8656    #[doc = "Unique identifier, domain based on src field"]
8657    pub id: u32,
8658    #[doc = "Estimated time until collision occurs"]
8659    pub time_to_minimum_delta: f32,
8660    #[doc = "Closest vertical distance between vehicle and object"]
8661    pub altitude_minimum_delta: f32,
8662    #[doc = "Closest horizontal distance between vehicle and object"]
8663    pub horizontal_minimum_delta: f32,
8664    #[doc = "Collision data source"]
8665    pub src: MavCollisionSrc,
8666    #[doc = "Action that is being taken to avoid this collision"]
8667    pub action: MavCollisionAction,
8668    #[doc = "How concerned the aircraft is about this collision"]
8669    pub threat_level: MavCollisionThreatLevel,
8670}
8671impl COLLISION_DATA {
8672    pub const ENCODED_LEN: usize = 19usize;
8673    pub const DEFAULT: Self = Self {
8674        id: 0_u32,
8675        time_to_minimum_delta: 0.0_f32,
8676        altitude_minimum_delta: 0.0_f32,
8677        horizontal_minimum_delta: 0.0_f32,
8678        src: MavCollisionSrc::DEFAULT,
8679        action: MavCollisionAction::DEFAULT,
8680        threat_level: MavCollisionThreatLevel::DEFAULT,
8681    };
8682    #[cfg(feature = "arbitrary")]
8683    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8684        use arbitrary::{Arbitrary, Unstructured};
8685        let mut buf = [0u8; 1024];
8686        rng.fill_bytes(&mut buf);
8687        let mut unstructured = Unstructured::new(&buf);
8688        Self::arbitrary(&mut unstructured).unwrap_or_default()
8689    }
8690}
8691impl Default for COLLISION_DATA {
8692    fn default() -> Self {
8693        Self::DEFAULT.clone()
8694    }
8695}
8696impl MessageData for COLLISION_DATA {
8697    type Message = MavMessage;
8698    const ID: u32 = 247u32;
8699    const NAME: &'static str = "COLLISION";
8700    const EXTRA_CRC: u8 = 81u8;
8701    const ENCODED_LEN: usize = 19usize;
8702    fn deser(
8703        _version: MavlinkVersion,
8704        __input: &[u8],
8705    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8706        let avail_len = __input.len();
8707        let mut payload_buf = [0; Self::ENCODED_LEN];
8708        let mut buf = if avail_len < Self::ENCODED_LEN {
8709            payload_buf[0..avail_len].copy_from_slice(__input);
8710            Bytes::new(&payload_buf)
8711        } else {
8712            Bytes::new(__input)
8713        };
8714        let mut __struct = Self::default();
8715        __struct.id = buf.get_u32_le();
8716        __struct.time_to_minimum_delta = buf.get_f32_le();
8717        __struct.altitude_minimum_delta = buf.get_f32_le();
8718        __struct.horizontal_minimum_delta = buf.get_f32_le();
8719        let tmp = buf.get_u8();
8720        __struct.src =
8721            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8722                enum_type: "MavCollisionSrc",
8723                value: tmp as u32,
8724            })?;
8725        let tmp = buf.get_u8();
8726        __struct.action =
8727            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8728                enum_type: "MavCollisionAction",
8729                value: tmp as u32,
8730            })?;
8731        let tmp = buf.get_u8();
8732        __struct.threat_level =
8733            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8734                enum_type: "MavCollisionThreatLevel",
8735                value: tmp as u32,
8736            })?;
8737        Ok(__struct)
8738    }
8739    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8740        let mut __tmp = BytesMut::new(bytes);
8741        #[allow(clippy::absurd_extreme_comparisons)]
8742        #[allow(unused_comparisons)]
8743        if __tmp.remaining() < Self::ENCODED_LEN {
8744            panic!(
8745                "buffer is too small (need {} bytes, but got {})",
8746                Self::ENCODED_LEN,
8747                __tmp.remaining(),
8748            )
8749        }
8750        __tmp.put_u32_le(self.id);
8751        __tmp.put_f32_le(self.time_to_minimum_delta);
8752        __tmp.put_f32_le(self.altitude_minimum_delta);
8753        __tmp.put_f32_le(self.horizontal_minimum_delta);
8754        __tmp.put_u8(self.src as u8);
8755        __tmp.put_u8(self.action as u8);
8756        __tmp.put_u8(self.threat_level as u8);
8757        if matches!(version, MavlinkVersion::V2) {
8758            let len = __tmp.len();
8759            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8760        } else {
8761            __tmp.len()
8762        }
8763    }
8764}
8765#[doc = "id: 77"]
8766#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8767#[derive(Debug, Clone, PartialEq)]
8768#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8770pub struct COMMAND_ACK_DATA {
8771    #[doc = "Command ID (of acknowledged command)."]
8772    pub command: MavCmd,
8773    #[doc = "Result of command."]
8774    pub result: MavResult,
8775    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
8776    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8777    pub progress: u8,
8778    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
8779    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8780    pub result_param2: i32,
8781    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8782    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8783    pub target_system: u8,
8784    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8785    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8786    pub target_component: u8,
8787}
8788impl COMMAND_ACK_DATA {
8789    pub const ENCODED_LEN: usize = 10usize;
8790    pub const DEFAULT: Self = Self {
8791        command: MavCmd::DEFAULT,
8792        result: MavResult::DEFAULT,
8793        progress: 0_u8,
8794        result_param2: 0_i32,
8795        target_system: 0_u8,
8796        target_component: 0_u8,
8797    };
8798    #[cfg(feature = "arbitrary")]
8799    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8800        use arbitrary::{Arbitrary, Unstructured};
8801        let mut buf = [0u8; 1024];
8802        rng.fill_bytes(&mut buf);
8803        let mut unstructured = Unstructured::new(&buf);
8804        Self::arbitrary(&mut unstructured).unwrap_or_default()
8805    }
8806}
8807impl Default for COMMAND_ACK_DATA {
8808    fn default() -> Self {
8809        Self::DEFAULT.clone()
8810    }
8811}
8812impl MessageData for COMMAND_ACK_DATA {
8813    type Message = MavMessage;
8814    const ID: u32 = 77u32;
8815    const NAME: &'static str = "COMMAND_ACK";
8816    const EXTRA_CRC: u8 = 143u8;
8817    const ENCODED_LEN: usize = 10usize;
8818    fn deser(
8819        _version: MavlinkVersion,
8820        __input: &[u8],
8821    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8822        let avail_len = __input.len();
8823        let mut payload_buf = [0; Self::ENCODED_LEN];
8824        let mut buf = if avail_len < Self::ENCODED_LEN {
8825            payload_buf[0..avail_len].copy_from_slice(__input);
8826            Bytes::new(&payload_buf)
8827        } else {
8828            Bytes::new(__input)
8829        };
8830        let mut __struct = Self::default();
8831        let tmp = buf.get_u16_le();
8832        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8833            ::mavlink_core::error::ParserError::InvalidEnum {
8834                enum_type: "MavCmd",
8835                value: tmp as u32,
8836            },
8837        )?;
8838        let tmp = buf.get_u8();
8839        __struct.result =
8840            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8841                enum_type: "MavResult",
8842                value: tmp as u32,
8843            })?;
8844        __struct.progress = buf.get_u8();
8845        __struct.result_param2 = buf.get_i32_le();
8846        __struct.target_system = buf.get_u8();
8847        __struct.target_component = buf.get_u8();
8848        Ok(__struct)
8849    }
8850    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8851        let mut __tmp = BytesMut::new(bytes);
8852        #[allow(clippy::absurd_extreme_comparisons)]
8853        #[allow(unused_comparisons)]
8854        if __tmp.remaining() < Self::ENCODED_LEN {
8855            panic!(
8856                "buffer is too small (need {} bytes, but got {})",
8857                Self::ENCODED_LEN,
8858                __tmp.remaining(),
8859            )
8860        }
8861        __tmp.put_u16_le(self.command as u16);
8862        __tmp.put_u8(self.result as u8);
8863        __tmp.put_u8(self.progress);
8864        __tmp.put_i32_le(self.result_param2);
8865        __tmp.put_u8(self.target_system);
8866        __tmp.put_u8(self.target_component);
8867        if matches!(version, MavlinkVersion::V2) {
8868            let len = __tmp.len();
8869            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8870        } else {
8871            __tmp.len()
8872        }
8873    }
8874}
8875#[doc = "id: 80"]
8876#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8877#[derive(Debug, Clone, PartialEq)]
8878#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8879#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8880pub struct COMMAND_CANCEL_DATA {
8881    #[doc = "Command ID (of command to cancel)."]
8882    pub command: MavCmd,
8883    #[doc = "System executing long running command. Should not be broadcast (0)."]
8884    pub target_system: u8,
8885    #[doc = "Component executing long running command."]
8886    pub target_component: u8,
8887}
8888impl COMMAND_CANCEL_DATA {
8889    pub const ENCODED_LEN: usize = 4usize;
8890    pub const DEFAULT: Self = Self {
8891        command: MavCmd::DEFAULT,
8892        target_system: 0_u8,
8893        target_component: 0_u8,
8894    };
8895    #[cfg(feature = "arbitrary")]
8896    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8897        use arbitrary::{Arbitrary, Unstructured};
8898        let mut buf = [0u8; 1024];
8899        rng.fill_bytes(&mut buf);
8900        let mut unstructured = Unstructured::new(&buf);
8901        Self::arbitrary(&mut unstructured).unwrap_or_default()
8902    }
8903}
8904impl Default for COMMAND_CANCEL_DATA {
8905    fn default() -> Self {
8906        Self::DEFAULT.clone()
8907    }
8908}
8909impl MessageData for COMMAND_CANCEL_DATA {
8910    type Message = MavMessage;
8911    const ID: u32 = 80u32;
8912    const NAME: &'static str = "COMMAND_CANCEL";
8913    const EXTRA_CRC: u8 = 14u8;
8914    const ENCODED_LEN: usize = 4usize;
8915    fn deser(
8916        _version: MavlinkVersion,
8917        __input: &[u8],
8918    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8919        let avail_len = __input.len();
8920        let mut payload_buf = [0; Self::ENCODED_LEN];
8921        let mut buf = if avail_len < Self::ENCODED_LEN {
8922            payload_buf[0..avail_len].copy_from_slice(__input);
8923            Bytes::new(&payload_buf)
8924        } else {
8925            Bytes::new(__input)
8926        };
8927        let mut __struct = Self::default();
8928        let tmp = buf.get_u16_le();
8929        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8930            ::mavlink_core::error::ParserError::InvalidEnum {
8931                enum_type: "MavCmd",
8932                value: tmp as u32,
8933            },
8934        )?;
8935        __struct.target_system = buf.get_u8();
8936        __struct.target_component = buf.get_u8();
8937        Ok(__struct)
8938    }
8939    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8940        let mut __tmp = BytesMut::new(bytes);
8941        #[allow(clippy::absurd_extreme_comparisons)]
8942        #[allow(unused_comparisons)]
8943        if __tmp.remaining() < Self::ENCODED_LEN {
8944            panic!(
8945                "buffer is too small (need {} bytes, but got {})",
8946                Self::ENCODED_LEN,
8947                __tmp.remaining(),
8948            )
8949        }
8950        __tmp.put_u16_le(self.command as u16);
8951        __tmp.put_u8(self.target_system);
8952        __tmp.put_u8(self.target_component);
8953        if matches!(version, MavlinkVersion::V2) {
8954            let len = __tmp.len();
8955            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8956        } else {
8957            __tmp.len()
8958        }
8959    }
8960}
8961#[doc = "id: 75"]
8962#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8963#[derive(Debug, Clone, PartialEq)]
8964#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8965#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8966pub struct COMMAND_INT_DATA {
8967    #[doc = "PARAM1, see MAV_CMD enum"]
8968    pub param1: f32,
8969    #[doc = "PARAM2, see MAV_CMD enum"]
8970    pub param2: f32,
8971    #[doc = "PARAM3, see MAV_CMD enum"]
8972    pub param3: f32,
8973    #[doc = "PARAM4, see MAV_CMD enum"]
8974    pub param4: f32,
8975    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
8976    pub x: i32,
8977    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
8978    pub y: i32,
8979    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
8980    pub z: f32,
8981    #[doc = "The scheduled action for the mission item."]
8982    pub command: MavCmd,
8983    #[doc = "System ID"]
8984    pub target_system: u8,
8985    #[doc = "Component ID"]
8986    pub target_component: u8,
8987    #[doc = "The coordinate system of the COMMAND."]
8988    pub frame: MavFrame,
8989    #[doc = "Not used."]
8990    pub current: u8,
8991    #[doc = "Not used (set 0)."]
8992    pub autocontinue: u8,
8993}
8994impl COMMAND_INT_DATA {
8995    pub const ENCODED_LEN: usize = 35usize;
8996    pub const DEFAULT: Self = Self {
8997        param1: 0.0_f32,
8998        param2: 0.0_f32,
8999        param3: 0.0_f32,
9000        param4: 0.0_f32,
9001        x: 0_i32,
9002        y: 0_i32,
9003        z: 0.0_f32,
9004        command: MavCmd::DEFAULT,
9005        target_system: 0_u8,
9006        target_component: 0_u8,
9007        frame: MavFrame::DEFAULT,
9008        current: 0_u8,
9009        autocontinue: 0_u8,
9010    };
9011    #[cfg(feature = "arbitrary")]
9012    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9013        use arbitrary::{Arbitrary, Unstructured};
9014        let mut buf = [0u8; 1024];
9015        rng.fill_bytes(&mut buf);
9016        let mut unstructured = Unstructured::new(&buf);
9017        Self::arbitrary(&mut unstructured).unwrap_or_default()
9018    }
9019}
9020impl Default for COMMAND_INT_DATA {
9021    fn default() -> Self {
9022        Self::DEFAULT.clone()
9023    }
9024}
9025impl MessageData for COMMAND_INT_DATA {
9026    type Message = MavMessage;
9027    const ID: u32 = 75u32;
9028    const NAME: &'static str = "COMMAND_INT";
9029    const EXTRA_CRC: u8 = 158u8;
9030    const ENCODED_LEN: usize = 35usize;
9031    fn deser(
9032        _version: MavlinkVersion,
9033        __input: &[u8],
9034    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9035        let avail_len = __input.len();
9036        let mut payload_buf = [0; Self::ENCODED_LEN];
9037        let mut buf = if avail_len < Self::ENCODED_LEN {
9038            payload_buf[0..avail_len].copy_from_slice(__input);
9039            Bytes::new(&payload_buf)
9040        } else {
9041            Bytes::new(__input)
9042        };
9043        let mut __struct = Self::default();
9044        __struct.param1 = buf.get_f32_le();
9045        __struct.param2 = buf.get_f32_le();
9046        __struct.param3 = buf.get_f32_le();
9047        __struct.param4 = buf.get_f32_le();
9048        __struct.x = buf.get_i32_le();
9049        __struct.y = buf.get_i32_le();
9050        __struct.z = buf.get_f32_le();
9051        let tmp = buf.get_u16_le();
9052        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9053            ::mavlink_core::error::ParserError::InvalidEnum {
9054                enum_type: "MavCmd",
9055                value: tmp as u32,
9056            },
9057        )?;
9058        __struct.target_system = buf.get_u8();
9059        __struct.target_component = buf.get_u8();
9060        let tmp = buf.get_u8();
9061        __struct.frame =
9062            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9063                enum_type: "MavFrame",
9064                value: tmp as u32,
9065            })?;
9066        __struct.current = buf.get_u8();
9067        __struct.autocontinue = buf.get_u8();
9068        Ok(__struct)
9069    }
9070    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9071        let mut __tmp = BytesMut::new(bytes);
9072        #[allow(clippy::absurd_extreme_comparisons)]
9073        #[allow(unused_comparisons)]
9074        if __tmp.remaining() < Self::ENCODED_LEN {
9075            panic!(
9076                "buffer is too small (need {} bytes, but got {})",
9077                Self::ENCODED_LEN,
9078                __tmp.remaining(),
9079            )
9080        }
9081        __tmp.put_f32_le(self.param1);
9082        __tmp.put_f32_le(self.param2);
9083        __tmp.put_f32_le(self.param3);
9084        __tmp.put_f32_le(self.param4);
9085        __tmp.put_i32_le(self.x);
9086        __tmp.put_i32_le(self.y);
9087        __tmp.put_f32_le(self.z);
9088        __tmp.put_u16_le(self.command as u16);
9089        __tmp.put_u8(self.target_system);
9090        __tmp.put_u8(self.target_component);
9091        __tmp.put_u8(self.frame as u8);
9092        __tmp.put_u8(self.current);
9093        __tmp.put_u8(self.autocontinue);
9094        if matches!(version, MavlinkVersion::V2) {
9095            let len = __tmp.len();
9096            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9097        } else {
9098            __tmp.len()
9099        }
9100    }
9101}
9102#[doc = "id: 76"]
9103#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9104#[derive(Debug, Clone, PartialEq)]
9105#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9107pub struct COMMAND_LONG_DATA {
9108    #[doc = "Parameter 1 (for the specific command)."]
9109    pub param1: f32,
9110    #[doc = "Parameter 2 (for the specific command)."]
9111    pub param2: f32,
9112    #[doc = "Parameter 3 (for the specific command)."]
9113    pub param3: f32,
9114    #[doc = "Parameter 4 (for the specific command)."]
9115    pub param4: f32,
9116    #[doc = "Parameter 5 (for the specific command)."]
9117    pub param5: f32,
9118    #[doc = "Parameter 6 (for the specific command)."]
9119    pub param6: f32,
9120    #[doc = "Parameter 7 (for the specific command)."]
9121    pub param7: f32,
9122    #[doc = "Command ID (of command to send)."]
9123    pub command: MavCmd,
9124    #[doc = "System which should execute the command"]
9125    pub target_system: u8,
9126    #[doc = "Component which should execute the command, 0 for all components"]
9127    pub target_component: u8,
9128    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9129    pub confirmation: u8,
9130}
9131impl COMMAND_LONG_DATA {
9132    pub const ENCODED_LEN: usize = 33usize;
9133    pub const DEFAULT: Self = Self {
9134        param1: 0.0_f32,
9135        param2: 0.0_f32,
9136        param3: 0.0_f32,
9137        param4: 0.0_f32,
9138        param5: 0.0_f32,
9139        param6: 0.0_f32,
9140        param7: 0.0_f32,
9141        command: MavCmd::DEFAULT,
9142        target_system: 0_u8,
9143        target_component: 0_u8,
9144        confirmation: 0_u8,
9145    };
9146    #[cfg(feature = "arbitrary")]
9147    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9148        use arbitrary::{Arbitrary, Unstructured};
9149        let mut buf = [0u8; 1024];
9150        rng.fill_bytes(&mut buf);
9151        let mut unstructured = Unstructured::new(&buf);
9152        Self::arbitrary(&mut unstructured).unwrap_or_default()
9153    }
9154}
9155impl Default for COMMAND_LONG_DATA {
9156    fn default() -> Self {
9157        Self::DEFAULT.clone()
9158    }
9159}
9160impl MessageData for COMMAND_LONG_DATA {
9161    type Message = MavMessage;
9162    const ID: u32 = 76u32;
9163    const NAME: &'static str = "COMMAND_LONG";
9164    const EXTRA_CRC: u8 = 152u8;
9165    const ENCODED_LEN: usize = 33usize;
9166    fn deser(
9167        _version: MavlinkVersion,
9168        __input: &[u8],
9169    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9170        let avail_len = __input.len();
9171        let mut payload_buf = [0; Self::ENCODED_LEN];
9172        let mut buf = if avail_len < Self::ENCODED_LEN {
9173            payload_buf[0..avail_len].copy_from_slice(__input);
9174            Bytes::new(&payload_buf)
9175        } else {
9176            Bytes::new(__input)
9177        };
9178        let mut __struct = Self::default();
9179        __struct.param1 = buf.get_f32_le();
9180        __struct.param2 = buf.get_f32_le();
9181        __struct.param3 = buf.get_f32_le();
9182        __struct.param4 = buf.get_f32_le();
9183        __struct.param5 = buf.get_f32_le();
9184        __struct.param6 = buf.get_f32_le();
9185        __struct.param7 = buf.get_f32_le();
9186        let tmp = buf.get_u16_le();
9187        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9188            ::mavlink_core::error::ParserError::InvalidEnum {
9189                enum_type: "MavCmd",
9190                value: tmp as u32,
9191            },
9192        )?;
9193        __struct.target_system = buf.get_u8();
9194        __struct.target_component = buf.get_u8();
9195        __struct.confirmation = buf.get_u8();
9196        Ok(__struct)
9197    }
9198    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9199        let mut __tmp = BytesMut::new(bytes);
9200        #[allow(clippy::absurd_extreme_comparisons)]
9201        #[allow(unused_comparisons)]
9202        if __tmp.remaining() < Self::ENCODED_LEN {
9203            panic!(
9204                "buffer is too small (need {} bytes, but got {})",
9205                Self::ENCODED_LEN,
9206                __tmp.remaining(),
9207            )
9208        }
9209        __tmp.put_f32_le(self.param1);
9210        __tmp.put_f32_le(self.param2);
9211        __tmp.put_f32_le(self.param3);
9212        __tmp.put_f32_le(self.param4);
9213        __tmp.put_f32_le(self.param5);
9214        __tmp.put_f32_le(self.param6);
9215        __tmp.put_f32_le(self.param7);
9216        __tmp.put_u16_le(self.command as u16);
9217        __tmp.put_u8(self.target_system);
9218        __tmp.put_u8(self.target_component);
9219        __tmp.put_u8(self.confirmation);
9220        if matches!(version, MavlinkVersion::V2) {
9221            let len = __tmp.len();
9222            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9223        } else {
9224            __tmp.len()
9225        }
9226    }
9227}
9228#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9229#[doc = "id: 395"]
9230#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9231#[derive(Debug, Clone, PartialEq)]
9232#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9233#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9234pub struct COMPONENT_INFORMATION_DATA {
9235    #[doc = "Timestamp (time since system boot)."]
9236    pub time_boot_ms: u32,
9237    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9238    pub general_metadata_file_crc: u32,
9239    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9240    pub peripherals_metadata_file_crc: u32,
9241    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9242    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9243    pub general_metadata_uri: [u8; 100],
9244    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9245    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9246    pub peripherals_metadata_uri: [u8; 100],
9247}
9248impl COMPONENT_INFORMATION_DATA {
9249    pub const ENCODED_LEN: usize = 212usize;
9250    pub const DEFAULT: Self = Self {
9251        time_boot_ms: 0_u32,
9252        general_metadata_file_crc: 0_u32,
9253        peripherals_metadata_file_crc: 0_u32,
9254        general_metadata_uri: [0_u8; 100usize],
9255        peripherals_metadata_uri: [0_u8; 100usize],
9256    };
9257    #[cfg(feature = "arbitrary")]
9258    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9259        use arbitrary::{Arbitrary, Unstructured};
9260        let mut buf = [0u8; 1024];
9261        rng.fill_bytes(&mut buf);
9262        let mut unstructured = Unstructured::new(&buf);
9263        Self::arbitrary(&mut unstructured).unwrap_or_default()
9264    }
9265}
9266impl Default for COMPONENT_INFORMATION_DATA {
9267    fn default() -> Self {
9268        Self::DEFAULT.clone()
9269    }
9270}
9271impl MessageData for COMPONENT_INFORMATION_DATA {
9272    type Message = MavMessage;
9273    const ID: u32 = 395u32;
9274    const NAME: &'static str = "COMPONENT_INFORMATION";
9275    const EXTRA_CRC: u8 = 0u8;
9276    const ENCODED_LEN: usize = 212usize;
9277    fn deser(
9278        _version: MavlinkVersion,
9279        __input: &[u8],
9280    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9281        let avail_len = __input.len();
9282        let mut payload_buf = [0; Self::ENCODED_LEN];
9283        let mut buf = if avail_len < Self::ENCODED_LEN {
9284            payload_buf[0..avail_len].copy_from_slice(__input);
9285            Bytes::new(&payload_buf)
9286        } else {
9287            Bytes::new(__input)
9288        };
9289        let mut __struct = Self::default();
9290        __struct.time_boot_ms = buf.get_u32_le();
9291        __struct.general_metadata_file_crc = buf.get_u32_le();
9292        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9293        for v in &mut __struct.general_metadata_uri {
9294            let val = buf.get_u8();
9295            *v = val;
9296        }
9297        for v in &mut __struct.peripherals_metadata_uri {
9298            let val = buf.get_u8();
9299            *v = val;
9300        }
9301        Ok(__struct)
9302    }
9303    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9304        let mut __tmp = BytesMut::new(bytes);
9305        #[allow(clippy::absurd_extreme_comparisons)]
9306        #[allow(unused_comparisons)]
9307        if __tmp.remaining() < Self::ENCODED_LEN {
9308            panic!(
9309                "buffer is too small (need {} bytes, but got {})",
9310                Self::ENCODED_LEN,
9311                __tmp.remaining(),
9312            )
9313        }
9314        __tmp.put_u32_le(self.time_boot_ms);
9315        __tmp.put_u32_le(self.general_metadata_file_crc);
9316        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9317        for val in &self.general_metadata_uri {
9318            __tmp.put_u8(*val);
9319        }
9320        for val in &self.peripherals_metadata_uri {
9321            __tmp.put_u8(*val);
9322        }
9323        if matches!(version, MavlinkVersion::V2) {
9324            let len = __tmp.len();
9325            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9326        } else {
9327            __tmp.len()
9328        }
9329    }
9330}
9331#[doc = "id: 396"]
9332#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9333#[derive(Debug, Clone, PartialEq)]
9334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9335#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9336pub struct COMPONENT_INFORMATION_BASIC_DATA {
9337    #[doc = "Component capability flags"]
9338    pub capabilities: MavProtocolCapability,
9339    #[doc = "Timestamp (time since system boot)."]
9340    pub time_boot_ms: u32,
9341    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9342    pub time_manufacture_s: u32,
9343    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9344    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9345    pub vendor_name: [u8; 32],
9346    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9347    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9348    pub model_name: [u8; 32],
9349    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9350    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9351    pub software_version: [u8; 24],
9352    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9353    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9354    pub hardware_version: [u8; 24],
9355    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9356    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9357    pub serial_number: [u8; 32],
9358}
9359impl COMPONENT_INFORMATION_BASIC_DATA {
9360    pub const ENCODED_LEN: usize = 160usize;
9361    pub const DEFAULT: Self = Self {
9362        capabilities: MavProtocolCapability::DEFAULT,
9363        time_boot_ms: 0_u32,
9364        time_manufacture_s: 0_u32,
9365        vendor_name: [0_u8; 32usize],
9366        model_name: [0_u8; 32usize],
9367        software_version: [0_u8; 24usize],
9368        hardware_version: [0_u8; 24usize],
9369        serial_number: [0_u8; 32usize],
9370    };
9371    #[cfg(feature = "arbitrary")]
9372    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9373        use arbitrary::{Arbitrary, Unstructured};
9374        let mut buf = [0u8; 1024];
9375        rng.fill_bytes(&mut buf);
9376        let mut unstructured = Unstructured::new(&buf);
9377        Self::arbitrary(&mut unstructured).unwrap_or_default()
9378    }
9379}
9380impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9381    fn default() -> Self {
9382        Self::DEFAULT.clone()
9383    }
9384}
9385impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9386    type Message = MavMessage;
9387    const ID: u32 = 396u32;
9388    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9389    const EXTRA_CRC: u8 = 50u8;
9390    const ENCODED_LEN: usize = 160usize;
9391    fn deser(
9392        _version: MavlinkVersion,
9393        __input: &[u8],
9394    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9395        let avail_len = __input.len();
9396        let mut payload_buf = [0; Self::ENCODED_LEN];
9397        let mut buf = if avail_len < Self::ENCODED_LEN {
9398            payload_buf[0..avail_len].copy_from_slice(__input);
9399            Bytes::new(&payload_buf)
9400        } else {
9401            Bytes::new(__input)
9402        };
9403        let mut __struct = Self::default();
9404        let tmp = buf.get_u64_le();
9405        __struct.capabilities = MavProtocolCapability::from_bits(
9406            tmp & MavProtocolCapability::all().bits(),
9407        )
9408        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9409            flag_type: "MavProtocolCapability",
9410            value: tmp as u32,
9411        })?;
9412        __struct.time_boot_ms = buf.get_u32_le();
9413        __struct.time_manufacture_s = buf.get_u32_le();
9414        for v in &mut __struct.vendor_name {
9415            let val = buf.get_u8();
9416            *v = val;
9417        }
9418        for v in &mut __struct.model_name {
9419            let val = buf.get_u8();
9420            *v = val;
9421        }
9422        for v in &mut __struct.software_version {
9423            let val = buf.get_u8();
9424            *v = val;
9425        }
9426        for v in &mut __struct.hardware_version {
9427            let val = buf.get_u8();
9428            *v = val;
9429        }
9430        for v in &mut __struct.serial_number {
9431            let val = buf.get_u8();
9432            *v = val;
9433        }
9434        Ok(__struct)
9435    }
9436    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9437        let mut __tmp = BytesMut::new(bytes);
9438        #[allow(clippy::absurd_extreme_comparisons)]
9439        #[allow(unused_comparisons)]
9440        if __tmp.remaining() < Self::ENCODED_LEN {
9441            panic!(
9442                "buffer is too small (need {} bytes, but got {})",
9443                Self::ENCODED_LEN,
9444                __tmp.remaining(),
9445            )
9446        }
9447        __tmp.put_u64_le(self.capabilities.bits());
9448        __tmp.put_u32_le(self.time_boot_ms);
9449        __tmp.put_u32_le(self.time_manufacture_s);
9450        for val in &self.vendor_name {
9451            __tmp.put_u8(*val);
9452        }
9453        for val in &self.model_name {
9454            __tmp.put_u8(*val);
9455        }
9456        for val in &self.software_version {
9457            __tmp.put_u8(*val);
9458        }
9459        for val in &self.hardware_version {
9460            __tmp.put_u8(*val);
9461        }
9462        for val in &self.serial_number {
9463            __tmp.put_u8(*val);
9464        }
9465        if matches!(version, MavlinkVersion::V2) {
9466            let len = __tmp.len();
9467            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9468        } else {
9469            __tmp.len()
9470        }
9471    }
9472}
9473#[doc = "id: 397"]
9474#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9475#[derive(Debug, Clone, PartialEq)]
9476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9478pub struct COMPONENT_METADATA_DATA {
9479    #[doc = "Timestamp (time since system boot)."]
9480    pub time_boot_ms: u32,
9481    #[doc = "CRC32 of the general metadata file."]
9482    pub file_crc: u32,
9483    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9484    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9485    pub uri: [u8; 100],
9486}
9487impl COMPONENT_METADATA_DATA {
9488    pub const ENCODED_LEN: usize = 108usize;
9489    pub const DEFAULT: Self = Self {
9490        time_boot_ms: 0_u32,
9491        file_crc: 0_u32,
9492        uri: [0_u8; 100usize],
9493    };
9494    #[cfg(feature = "arbitrary")]
9495    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9496        use arbitrary::{Arbitrary, Unstructured};
9497        let mut buf = [0u8; 1024];
9498        rng.fill_bytes(&mut buf);
9499        let mut unstructured = Unstructured::new(&buf);
9500        Self::arbitrary(&mut unstructured).unwrap_or_default()
9501    }
9502}
9503impl Default for COMPONENT_METADATA_DATA {
9504    fn default() -> Self {
9505        Self::DEFAULT.clone()
9506    }
9507}
9508impl MessageData for COMPONENT_METADATA_DATA {
9509    type Message = MavMessage;
9510    const ID: u32 = 397u32;
9511    const NAME: &'static str = "COMPONENT_METADATA";
9512    const EXTRA_CRC: u8 = 182u8;
9513    const ENCODED_LEN: usize = 108usize;
9514    fn deser(
9515        _version: MavlinkVersion,
9516        __input: &[u8],
9517    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9518        let avail_len = __input.len();
9519        let mut payload_buf = [0; Self::ENCODED_LEN];
9520        let mut buf = if avail_len < Self::ENCODED_LEN {
9521            payload_buf[0..avail_len].copy_from_slice(__input);
9522            Bytes::new(&payload_buf)
9523        } else {
9524            Bytes::new(__input)
9525        };
9526        let mut __struct = Self::default();
9527        __struct.time_boot_ms = buf.get_u32_le();
9528        __struct.file_crc = buf.get_u32_le();
9529        for v in &mut __struct.uri {
9530            let val = buf.get_u8();
9531            *v = val;
9532        }
9533        Ok(__struct)
9534    }
9535    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9536        let mut __tmp = BytesMut::new(bytes);
9537        #[allow(clippy::absurd_extreme_comparisons)]
9538        #[allow(unused_comparisons)]
9539        if __tmp.remaining() < Self::ENCODED_LEN {
9540            panic!(
9541                "buffer is too small (need {} bytes, but got {})",
9542                Self::ENCODED_LEN,
9543                __tmp.remaining(),
9544            )
9545        }
9546        __tmp.put_u32_le(self.time_boot_ms);
9547        __tmp.put_u32_le(self.file_crc);
9548        for val in &self.uri {
9549            __tmp.put_u8(*val);
9550        }
9551        if matches!(version, MavlinkVersion::V2) {
9552            let len = __tmp.len();
9553            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9554        } else {
9555            __tmp.len()
9556        }
9557    }
9558}
9559#[doc = "id: 146"]
9560#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9561#[derive(Debug, Clone, PartialEq)]
9562#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9563#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9564pub struct CONTROL_SYSTEM_STATE_DATA {
9565    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9566    pub time_usec: u64,
9567    #[doc = "X acceleration in body frame"]
9568    pub x_acc: f32,
9569    #[doc = "Y acceleration in body frame"]
9570    pub y_acc: f32,
9571    #[doc = "Z acceleration in body frame"]
9572    pub z_acc: f32,
9573    #[doc = "X velocity in body frame"]
9574    pub x_vel: f32,
9575    #[doc = "Y velocity in body frame"]
9576    pub y_vel: f32,
9577    #[doc = "Z velocity in body frame"]
9578    pub z_vel: f32,
9579    #[doc = "X position in local frame"]
9580    pub x_pos: f32,
9581    #[doc = "Y position in local frame"]
9582    pub y_pos: f32,
9583    #[doc = "Z position in local frame"]
9584    pub z_pos: f32,
9585    #[doc = "Airspeed, set to -1 if unknown"]
9586    pub airspeed: f32,
9587    #[doc = "Variance of body velocity estimate"]
9588    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9589    pub vel_variance: [f32; 3],
9590    #[doc = "Variance in local position"]
9591    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9592    pub pos_variance: [f32; 3],
9593    #[doc = "The attitude, represented as Quaternion"]
9594    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9595    pub q: [f32; 4],
9596    #[doc = "Angular rate in roll axis"]
9597    pub roll_rate: f32,
9598    #[doc = "Angular rate in pitch axis"]
9599    pub pitch_rate: f32,
9600    #[doc = "Angular rate in yaw axis"]
9601    pub yaw_rate: f32,
9602}
9603impl CONTROL_SYSTEM_STATE_DATA {
9604    pub const ENCODED_LEN: usize = 100usize;
9605    pub const DEFAULT: Self = Self {
9606        time_usec: 0_u64,
9607        x_acc: 0.0_f32,
9608        y_acc: 0.0_f32,
9609        z_acc: 0.0_f32,
9610        x_vel: 0.0_f32,
9611        y_vel: 0.0_f32,
9612        z_vel: 0.0_f32,
9613        x_pos: 0.0_f32,
9614        y_pos: 0.0_f32,
9615        z_pos: 0.0_f32,
9616        airspeed: 0.0_f32,
9617        vel_variance: [0.0_f32; 3usize],
9618        pos_variance: [0.0_f32; 3usize],
9619        q: [0.0_f32; 4usize],
9620        roll_rate: 0.0_f32,
9621        pitch_rate: 0.0_f32,
9622        yaw_rate: 0.0_f32,
9623    };
9624    #[cfg(feature = "arbitrary")]
9625    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9626        use arbitrary::{Arbitrary, Unstructured};
9627        let mut buf = [0u8; 1024];
9628        rng.fill_bytes(&mut buf);
9629        let mut unstructured = Unstructured::new(&buf);
9630        Self::arbitrary(&mut unstructured).unwrap_or_default()
9631    }
9632}
9633impl Default for CONTROL_SYSTEM_STATE_DATA {
9634    fn default() -> Self {
9635        Self::DEFAULT.clone()
9636    }
9637}
9638impl MessageData for CONTROL_SYSTEM_STATE_DATA {
9639    type Message = MavMessage;
9640    const ID: u32 = 146u32;
9641    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
9642    const EXTRA_CRC: u8 = 103u8;
9643    const ENCODED_LEN: usize = 100usize;
9644    fn deser(
9645        _version: MavlinkVersion,
9646        __input: &[u8],
9647    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9648        let avail_len = __input.len();
9649        let mut payload_buf = [0; Self::ENCODED_LEN];
9650        let mut buf = if avail_len < Self::ENCODED_LEN {
9651            payload_buf[0..avail_len].copy_from_slice(__input);
9652            Bytes::new(&payload_buf)
9653        } else {
9654            Bytes::new(__input)
9655        };
9656        let mut __struct = Self::default();
9657        __struct.time_usec = buf.get_u64_le();
9658        __struct.x_acc = buf.get_f32_le();
9659        __struct.y_acc = buf.get_f32_le();
9660        __struct.z_acc = buf.get_f32_le();
9661        __struct.x_vel = buf.get_f32_le();
9662        __struct.y_vel = buf.get_f32_le();
9663        __struct.z_vel = buf.get_f32_le();
9664        __struct.x_pos = buf.get_f32_le();
9665        __struct.y_pos = buf.get_f32_le();
9666        __struct.z_pos = buf.get_f32_le();
9667        __struct.airspeed = buf.get_f32_le();
9668        for v in &mut __struct.vel_variance {
9669            let val = buf.get_f32_le();
9670            *v = val;
9671        }
9672        for v in &mut __struct.pos_variance {
9673            let val = buf.get_f32_le();
9674            *v = val;
9675        }
9676        for v in &mut __struct.q {
9677            let val = buf.get_f32_le();
9678            *v = val;
9679        }
9680        __struct.roll_rate = buf.get_f32_le();
9681        __struct.pitch_rate = buf.get_f32_le();
9682        __struct.yaw_rate = buf.get_f32_le();
9683        Ok(__struct)
9684    }
9685    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9686        let mut __tmp = BytesMut::new(bytes);
9687        #[allow(clippy::absurd_extreme_comparisons)]
9688        #[allow(unused_comparisons)]
9689        if __tmp.remaining() < Self::ENCODED_LEN {
9690            panic!(
9691                "buffer is too small (need {} bytes, but got {})",
9692                Self::ENCODED_LEN,
9693                __tmp.remaining(),
9694            )
9695        }
9696        __tmp.put_u64_le(self.time_usec);
9697        __tmp.put_f32_le(self.x_acc);
9698        __tmp.put_f32_le(self.y_acc);
9699        __tmp.put_f32_le(self.z_acc);
9700        __tmp.put_f32_le(self.x_vel);
9701        __tmp.put_f32_le(self.y_vel);
9702        __tmp.put_f32_le(self.z_vel);
9703        __tmp.put_f32_le(self.x_pos);
9704        __tmp.put_f32_le(self.y_pos);
9705        __tmp.put_f32_le(self.z_pos);
9706        __tmp.put_f32_le(self.airspeed);
9707        for val in &self.vel_variance {
9708            __tmp.put_f32_le(*val);
9709        }
9710        for val in &self.pos_variance {
9711            __tmp.put_f32_le(*val);
9712        }
9713        for val in &self.q {
9714            __tmp.put_f32_le(*val);
9715        }
9716        __tmp.put_f32_le(self.roll_rate);
9717        __tmp.put_f32_le(self.pitch_rate);
9718        __tmp.put_f32_le(self.yaw_rate);
9719        if matches!(version, MavlinkVersion::V2) {
9720            let len = __tmp.len();
9721            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9722        } else {
9723            __tmp.len()
9724        }
9725    }
9726}
9727#[doc = "id: 411"]
9728#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
9729#[derive(Debug, Clone, PartialEq)]
9730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9732pub struct CURRENT_EVENT_SEQUENCE_DATA {
9733    #[doc = "Sequence number."]
9734    pub sequence: u16,
9735    #[doc = "Flag bitset."]
9736    pub flags: MavEventCurrentSequenceFlags,
9737}
9738impl CURRENT_EVENT_SEQUENCE_DATA {
9739    pub const ENCODED_LEN: usize = 3usize;
9740    pub const DEFAULT: Self = Self {
9741        sequence: 0_u16,
9742        flags: MavEventCurrentSequenceFlags::DEFAULT,
9743    };
9744    #[cfg(feature = "arbitrary")]
9745    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9746        use arbitrary::{Arbitrary, Unstructured};
9747        let mut buf = [0u8; 1024];
9748        rng.fill_bytes(&mut buf);
9749        let mut unstructured = Unstructured::new(&buf);
9750        Self::arbitrary(&mut unstructured).unwrap_or_default()
9751    }
9752}
9753impl Default for CURRENT_EVENT_SEQUENCE_DATA {
9754    fn default() -> Self {
9755        Self::DEFAULT.clone()
9756    }
9757}
9758impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
9759    type Message = MavMessage;
9760    const ID: u32 = 411u32;
9761    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
9762    const EXTRA_CRC: u8 = 106u8;
9763    const ENCODED_LEN: usize = 3usize;
9764    fn deser(
9765        _version: MavlinkVersion,
9766        __input: &[u8],
9767    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9768        let avail_len = __input.len();
9769        let mut payload_buf = [0; Self::ENCODED_LEN];
9770        let mut buf = if avail_len < Self::ENCODED_LEN {
9771            payload_buf[0..avail_len].copy_from_slice(__input);
9772            Bytes::new(&payload_buf)
9773        } else {
9774            Bytes::new(__input)
9775        };
9776        let mut __struct = Self::default();
9777        __struct.sequence = buf.get_u16_le();
9778        let tmp = buf.get_u8();
9779        __struct.flags =
9780            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9781                enum_type: "MavEventCurrentSequenceFlags",
9782                value: tmp as u32,
9783            })?;
9784        Ok(__struct)
9785    }
9786    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9787        let mut __tmp = BytesMut::new(bytes);
9788        #[allow(clippy::absurd_extreme_comparisons)]
9789        #[allow(unused_comparisons)]
9790        if __tmp.remaining() < Self::ENCODED_LEN {
9791            panic!(
9792                "buffer is too small (need {} bytes, but got {})",
9793                Self::ENCODED_LEN,
9794                __tmp.remaining(),
9795            )
9796        }
9797        __tmp.put_u16_le(self.sequence);
9798        __tmp.put_u8(self.flags as u8);
9799        if matches!(version, MavlinkVersion::V2) {
9800            let len = __tmp.len();
9801            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9802        } else {
9803            __tmp.len()
9804        }
9805    }
9806}
9807#[doc = "id: 436"]
9808#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
9809#[derive(Debug, Clone, PartialEq)]
9810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9812pub struct CURRENT_MODE_DATA {
9813    #[doc = "A bitfield for use for autopilot-specific flags"]
9814    pub custom_mode: u32,
9815    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
9816    pub intended_custom_mode: u32,
9817    #[doc = "Standard mode."]
9818    pub standard_mode: MavStandardMode,
9819}
9820impl CURRENT_MODE_DATA {
9821    pub const ENCODED_LEN: usize = 9usize;
9822    pub const DEFAULT: Self = Self {
9823        custom_mode: 0_u32,
9824        intended_custom_mode: 0_u32,
9825        standard_mode: MavStandardMode::DEFAULT,
9826    };
9827    #[cfg(feature = "arbitrary")]
9828    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9829        use arbitrary::{Arbitrary, Unstructured};
9830        let mut buf = [0u8; 1024];
9831        rng.fill_bytes(&mut buf);
9832        let mut unstructured = Unstructured::new(&buf);
9833        Self::arbitrary(&mut unstructured).unwrap_or_default()
9834    }
9835}
9836impl Default for CURRENT_MODE_DATA {
9837    fn default() -> Self {
9838        Self::DEFAULT.clone()
9839    }
9840}
9841impl MessageData for CURRENT_MODE_DATA {
9842    type Message = MavMessage;
9843    const ID: u32 = 436u32;
9844    const NAME: &'static str = "CURRENT_MODE";
9845    const EXTRA_CRC: u8 = 193u8;
9846    const ENCODED_LEN: usize = 9usize;
9847    fn deser(
9848        _version: MavlinkVersion,
9849        __input: &[u8],
9850    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9851        let avail_len = __input.len();
9852        let mut payload_buf = [0; Self::ENCODED_LEN];
9853        let mut buf = if avail_len < Self::ENCODED_LEN {
9854            payload_buf[0..avail_len].copy_from_slice(__input);
9855            Bytes::new(&payload_buf)
9856        } else {
9857            Bytes::new(__input)
9858        };
9859        let mut __struct = Self::default();
9860        __struct.custom_mode = buf.get_u32_le();
9861        __struct.intended_custom_mode = buf.get_u32_le();
9862        let tmp = buf.get_u8();
9863        __struct.standard_mode =
9864            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9865                enum_type: "MavStandardMode",
9866                value: tmp as u32,
9867            })?;
9868        Ok(__struct)
9869    }
9870    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9871        let mut __tmp = BytesMut::new(bytes);
9872        #[allow(clippy::absurd_extreme_comparisons)]
9873        #[allow(unused_comparisons)]
9874        if __tmp.remaining() < Self::ENCODED_LEN {
9875            panic!(
9876                "buffer is too small (need {} bytes, but got {})",
9877                Self::ENCODED_LEN,
9878                __tmp.remaining(),
9879            )
9880        }
9881        __tmp.put_u32_le(self.custom_mode);
9882        __tmp.put_u32_le(self.intended_custom_mode);
9883        __tmp.put_u8(self.standard_mode as u8);
9884        if matches!(version, MavlinkVersion::V2) {
9885            let len = __tmp.len();
9886            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9887        } else {
9888            __tmp.len()
9889        }
9890    }
9891}
9892#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
9893#[doc = "id: 67"]
9894#[doc = "Data stream status information."]
9895#[derive(Debug, Clone, PartialEq)]
9896#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9897#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9898pub struct DATA_STREAM_DATA {
9899    #[doc = "The message rate"]
9900    pub message_rate: u16,
9901    #[doc = "The ID of the requested data stream"]
9902    pub stream_id: u8,
9903    #[doc = "1 stream is enabled, 0 stream is stopped."]
9904    pub on_off: u8,
9905}
9906impl DATA_STREAM_DATA {
9907    pub const ENCODED_LEN: usize = 4usize;
9908    pub const DEFAULT: Self = Self {
9909        message_rate: 0_u16,
9910        stream_id: 0_u8,
9911        on_off: 0_u8,
9912    };
9913    #[cfg(feature = "arbitrary")]
9914    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9915        use arbitrary::{Arbitrary, Unstructured};
9916        let mut buf = [0u8; 1024];
9917        rng.fill_bytes(&mut buf);
9918        let mut unstructured = Unstructured::new(&buf);
9919        Self::arbitrary(&mut unstructured).unwrap_or_default()
9920    }
9921}
9922impl Default for DATA_STREAM_DATA {
9923    fn default() -> Self {
9924        Self::DEFAULT.clone()
9925    }
9926}
9927impl MessageData for DATA_STREAM_DATA {
9928    type Message = MavMessage;
9929    const ID: u32 = 67u32;
9930    const NAME: &'static str = "DATA_STREAM";
9931    const EXTRA_CRC: u8 = 21u8;
9932    const ENCODED_LEN: usize = 4usize;
9933    fn deser(
9934        _version: MavlinkVersion,
9935        __input: &[u8],
9936    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9937        let avail_len = __input.len();
9938        let mut payload_buf = [0; Self::ENCODED_LEN];
9939        let mut buf = if avail_len < Self::ENCODED_LEN {
9940            payload_buf[0..avail_len].copy_from_slice(__input);
9941            Bytes::new(&payload_buf)
9942        } else {
9943            Bytes::new(__input)
9944        };
9945        let mut __struct = Self::default();
9946        __struct.message_rate = buf.get_u16_le();
9947        __struct.stream_id = buf.get_u8();
9948        __struct.on_off = buf.get_u8();
9949        Ok(__struct)
9950    }
9951    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9952        let mut __tmp = BytesMut::new(bytes);
9953        #[allow(clippy::absurd_extreme_comparisons)]
9954        #[allow(unused_comparisons)]
9955        if __tmp.remaining() < Self::ENCODED_LEN {
9956            panic!(
9957                "buffer is too small (need {} bytes, but got {})",
9958                Self::ENCODED_LEN,
9959                __tmp.remaining(),
9960            )
9961        }
9962        __tmp.put_u16_le(self.message_rate);
9963        __tmp.put_u8(self.stream_id);
9964        __tmp.put_u8(self.on_off);
9965        if matches!(version, MavlinkVersion::V2) {
9966            let len = __tmp.len();
9967            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9968        } else {
9969            __tmp.len()
9970        }
9971    }
9972}
9973#[doc = "id: 130"]
9974#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
9975#[derive(Debug, Clone, PartialEq)]
9976#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9978pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
9979    #[doc = "total data size (set on ACK only)."]
9980    pub size: u32,
9981    #[doc = "Width of a matrix or image."]
9982    pub width: u16,
9983    #[doc = "Height of a matrix or image."]
9984    pub height: u16,
9985    #[doc = "Number of packets being sent (set on ACK only)."]
9986    pub packets: u16,
9987    #[doc = "Type of requested/acknowledged data."]
9988    pub mavtype: MavlinkDataStreamType,
9989    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
9990    pub payload: u8,
9991    #[doc = "JPEG quality. Values: [1-100]."]
9992    pub jpg_quality: u8,
9993}
9994impl DATA_TRANSMISSION_HANDSHAKE_DATA {
9995    pub const ENCODED_LEN: usize = 13usize;
9996    pub const DEFAULT: Self = Self {
9997        size: 0_u32,
9998        width: 0_u16,
9999        height: 0_u16,
10000        packets: 0_u16,
10001        mavtype: MavlinkDataStreamType::DEFAULT,
10002        payload: 0_u8,
10003        jpg_quality: 0_u8,
10004    };
10005    #[cfg(feature = "arbitrary")]
10006    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10007        use arbitrary::{Arbitrary, Unstructured};
10008        let mut buf = [0u8; 1024];
10009        rng.fill_bytes(&mut buf);
10010        let mut unstructured = Unstructured::new(&buf);
10011        Self::arbitrary(&mut unstructured).unwrap_or_default()
10012    }
10013}
10014impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10015    fn default() -> Self {
10016        Self::DEFAULT.clone()
10017    }
10018}
10019impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10020    type Message = MavMessage;
10021    const ID: u32 = 130u32;
10022    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10023    const EXTRA_CRC: u8 = 29u8;
10024    const ENCODED_LEN: usize = 13usize;
10025    fn deser(
10026        _version: MavlinkVersion,
10027        __input: &[u8],
10028    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10029        let avail_len = __input.len();
10030        let mut payload_buf = [0; Self::ENCODED_LEN];
10031        let mut buf = if avail_len < Self::ENCODED_LEN {
10032            payload_buf[0..avail_len].copy_from_slice(__input);
10033            Bytes::new(&payload_buf)
10034        } else {
10035            Bytes::new(__input)
10036        };
10037        let mut __struct = Self::default();
10038        __struct.size = buf.get_u32_le();
10039        __struct.width = buf.get_u16_le();
10040        __struct.height = buf.get_u16_le();
10041        __struct.packets = buf.get_u16_le();
10042        let tmp = buf.get_u8();
10043        __struct.mavtype =
10044            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10045                enum_type: "MavlinkDataStreamType",
10046                value: tmp as u32,
10047            })?;
10048        __struct.payload = buf.get_u8();
10049        __struct.jpg_quality = buf.get_u8();
10050        Ok(__struct)
10051    }
10052    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10053        let mut __tmp = BytesMut::new(bytes);
10054        #[allow(clippy::absurd_extreme_comparisons)]
10055        #[allow(unused_comparisons)]
10056        if __tmp.remaining() < Self::ENCODED_LEN {
10057            panic!(
10058                "buffer is too small (need {} bytes, but got {})",
10059                Self::ENCODED_LEN,
10060                __tmp.remaining(),
10061            )
10062        }
10063        __tmp.put_u32_le(self.size);
10064        __tmp.put_u16_le(self.width);
10065        __tmp.put_u16_le(self.height);
10066        __tmp.put_u16_le(self.packets);
10067        __tmp.put_u8(self.mavtype as u8);
10068        __tmp.put_u8(self.payload);
10069        __tmp.put_u8(self.jpg_quality);
10070        if matches!(version, MavlinkVersion::V2) {
10071            let len = __tmp.len();
10072            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10073        } else {
10074            __tmp.len()
10075        }
10076    }
10077}
10078#[doc = "id: 254"]
10079#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10080#[derive(Debug, Clone, PartialEq)]
10081#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10082#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10083pub struct DEBUG_DATA {
10084    #[doc = "Timestamp (time since system boot)."]
10085    pub time_boot_ms: u32,
10086    #[doc = "DEBUG value"]
10087    pub value: f32,
10088    #[doc = "index of debug variable"]
10089    pub ind: u8,
10090}
10091impl DEBUG_DATA {
10092    pub const ENCODED_LEN: usize = 9usize;
10093    pub const DEFAULT: Self = Self {
10094        time_boot_ms: 0_u32,
10095        value: 0.0_f32,
10096        ind: 0_u8,
10097    };
10098    #[cfg(feature = "arbitrary")]
10099    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10100        use arbitrary::{Arbitrary, Unstructured};
10101        let mut buf = [0u8; 1024];
10102        rng.fill_bytes(&mut buf);
10103        let mut unstructured = Unstructured::new(&buf);
10104        Self::arbitrary(&mut unstructured).unwrap_or_default()
10105    }
10106}
10107impl Default for DEBUG_DATA {
10108    fn default() -> Self {
10109        Self::DEFAULT.clone()
10110    }
10111}
10112impl MessageData for DEBUG_DATA {
10113    type Message = MavMessage;
10114    const ID: u32 = 254u32;
10115    const NAME: &'static str = "DEBUG";
10116    const EXTRA_CRC: u8 = 46u8;
10117    const ENCODED_LEN: usize = 9usize;
10118    fn deser(
10119        _version: MavlinkVersion,
10120        __input: &[u8],
10121    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10122        let avail_len = __input.len();
10123        let mut payload_buf = [0; Self::ENCODED_LEN];
10124        let mut buf = if avail_len < Self::ENCODED_LEN {
10125            payload_buf[0..avail_len].copy_from_slice(__input);
10126            Bytes::new(&payload_buf)
10127        } else {
10128            Bytes::new(__input)
10129        };
10130        let mut __struct = Self::default();
10131        __struct.time_boot_ms = buf.get_u32_le();
10132        __struct.value = buf.get_f32_le();
10133        __struct.ind = buf.get_u8();
10134        Ok(__struct)
10135    }
10136    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10137        let mut __tmp = BytesMut::new(bytes);
10138        #[allow(clippy::absurd_extreme_comparisons)]
10139        #[allow(unused_comparisons)]
10140        if __tmp.remaining() < Self::ENCODED_LEN {
10141            panic!(
10142                "buffer is too small (need {} bytes, but got {})",
10143                Self::ENCODED_LEN,
10144                __tmp.remaining(),
10145            )
10146        }
10147        __tmp.put_u32_le(self.time_boot_ms);
10148        __tmp.put_f32_le(self.value);
10149        __tmp.put_u8(self.ind);
10150        if matches!(version, MavlinkVersion::V2) {
10151            let len = __tmp.len();
10152            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10153        } else {
10154            __tmp.len()
10155        }
10156    }
10157}
10158#[doc = "id: 350"]
10159#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10160#[derive(Debug, Clone, PartialEq)]
10161#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10162#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10163pub struct DEBUG_FLOAT_ARRAY_DATA {
10164    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10165    pub time_usec: u64,
10166    #[doc = "Unique ID used to discriminate between arrays"]
10167    pub array_id: u16,
10168    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10169    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10170    pub name: [u8; 10],
10171    #[doc = "data"]
10172    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10173    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10174    pub data: [f32; 58],
10175}
10176impl DEBUG_FLOAT_ARRAY_DATA {
10177    pub const ENCODED_LEN: usize = 252usize;
10178    pub const DEFAULT: Self = Self {
10179        time_usec: 0_u64,
10180        array_id: 0_u16,
10181        name: [0_u8; 10usize],
10182        data: [0.0_f32; 58usize],
10183    };
10184    #[cfg(feature = "arbitrary")]
10185    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10186        use arbitrary::{Arbitrary, Unstructured};
10187        let mut buf = [0u8; 1024];
10188        rng.fill_bytes(&mut buf);
10189        let mut unstructured = Unstructured::new(&buf);
10190        Self::arbitrary(&mut unstructured).unwrap_or_default()
10191    }
10192}
10193impl Default for DEBUG_FLOAT_ARRAY_DATA {
10194    fn default() -> Self {
10195        Self::DEFAULT.clone()
10196    }
10197}
10198impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10199    type Message = MavMessage;
10200    const ID: u32 = 350u32;
10201    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10202    const EXTRA_CRC: u8 = 232u8;
10203    const ENCODED_LEN: usize = 252usize;
10204    fn deser(
10205        _version: MavlinkVersion,
10206        __input: &[u8],
10207    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10208        let avail_len = __input.len();
10209        let mut payload_buf = [0; Self::ENCODED_LEN];
10210        let mut buf = if avail_len < Self::ENCODED_LEN {
10211            payload_buf[0..avail_len].copy_from_slice(__input);
10212            Bytes::new(&payload_buf)
10213        } else {
10214            Bytes::new(__input)
10215        };
10216        let mut __struct = Self::default();
10217        __struct.time_usec = buf.get_u64_le();
10218        __struct.array_id = buf.get_u16_le();
10219        for v in &mut __struct.name {
10220            let val = buf.get_u8();
10221            *v = val;
10222        }
10223        for v in &mut __struct.data {
10224            let val = buf.get_f32_le();
10225            *v = val;
10226        }
10227        Ok(__struct)
10228    }
10229    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10230        let mut __tmp = BytesMut::new(bytes);
10231        #[allow(clippy::absurd_extreme_comparisons)]
10232        #[allow(unused_comparisons)]
10233        if __tmp.remaining() < Self::ENCODED_LEN {
10234            panic!(
10235                "buffer is too small (need {} bytes, but got {})",
10236                Self::ENCODED_LEN,
10237                __tmp.remaining(),
10238            )
10239        }
10240        __tmp.put_u64_le(self.time_usec);
10241        __tmp.put_u16_le(self.array_id);
10242        for val in &self.name {
10243            __tmp.put_u8(*val);
10244        }
10245        for val in &self.data {
10246            __tmp.put_f32_le(*val);
10247        }
10248        if matches!(version, MavlinkVersion::V2) {
10249            let len = __tmp.len();
10250            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10251        } else {
10252            __tmp.len()
10253        }
10254    }
10255}
10256#[doc = "id: 250"]
10257#[doc = "To debug something using a named 3D vector."]
10258#[derive(Debug, Clone, PartialEq)]
10259#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10260#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10261pub struct DEBUG_VECT_DATA {
10262    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10263    pub time_usec: u64,
10264    #[doc = "x"]
10265    pub x: f32,
10266    #[doc = "y"]
10267    pub y: f32,
10268    #[doc = "z"]
10269    pub z: f32,
10270    #[doc = "Name"]
10271    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10272    pub name: [u8; 10],
10273}
10274impl DEBUG_VECT_DATA {
10275    pub const ENCODED_LEN: usize = 30usize;
10276    pub const DEFAULT: Self = Self {
10277        time_usec: 0_u64,
10278        x: 0.0_f32,
10279        y: 0.0_f32,
10280        z: 0.0_f32,
10281        name: [0_u8; 10usize],
10282    };
10283    #[cfg(feature = "arbitrary")]
10284    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10285        use arbitrary::{Arbitrary, Unstructured};
10286        let mut buf = [0u8; 1024];
10287        rng.fill_bytes(&mut buf);
10288        let mut unstructured = Unstructured::new(&buf);
10289        Self::arbitrary(&mut unstructured).unwrap_or_default()
10290    }
10291}
10292impl Default for DEBUG_VECT_DATA {
10293    fn default() -> Self {
10294        Self::DEFAULT.clone()
10295    }
10296}
10297impl MessageData for DEBUG_VECT_DATA {
10298    type Message = MavMessage;
10299    const ID: u32 = 250u32;
10300    const NAME: &'static str = "DEBUG_VECT";
10301    const EXTRA_CRC: u8 = 49u8;
10302    const ENCODED_LEN: usize = 30usize;
10303    fn deser(
10304        _version: MavlinkVersion,
10305        __input: &[u8],
10306    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10307        let avail_len = __input.len();
10308        let mut payload_buf = [0; Self::ENCODED_LEN];
10309        let mut buf = if avail_len < Self::ENCODED_LEN {
10310            payload_buf[0..avail_len].copy_from_slice(__input);
10311            Bytes::new(&payload_buf)
10312        } else {
10313            Bytes::new(__input)
10314        };
10315        let mut __struct = Self::default();
10316        __struct.time_usec = buf.get_u64_le();
10317        __struct.x = buf.get_f32_le();
10318        __struct.y = buf.get_f32_le();
10319        __struct.z = buf.get_f32_le();
10320        for v in &mut __struct.name {
10321            let val = buf.get_u8();
10322            *v = val;
10323        }
10324        Ok(__struct)
10325    }
10326    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10327        let mut __tmp = BytesMut::new(bytes);
10328        #[allow(clippy::absurd_extreme_comparisons)]
10329        #[allow(unused_comparisons)]
10330        if __tmp.remaining() < Self::ENCODED_LEN {
10331            panic!(
10332                "buffer is too small (need {} bytes, but got {})",
10333                Self::ENCODED_LEN,
10334                __tmp.remaining(),
10335            )
10336        }
10337        __tmp.put_u64_le(self.time_usec);
10338        __tmp.put_f32_le(self.x);
10339        __tmp.put_f32_le(self.y);
10340        __tmp.put_f32_le(self.z);
10341        for val in &self.name {
10342            __tmp.put_u8(*val);
10343        }
10344        if matches!(version, MavlinkVersion::V2) {
10345            let len = __tmp.len();
10346            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10347        } else {
10348            __tmp.len()
10349        }
10350    }
10351}
10352#[doc = "id: 132"]
10353#[doc = "Distance sensor information for an onboard rangefinder."]
10354#[derive(Debug, Clone, PartialEq)]
10355#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10356#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10357pub struct DISTANCE_SENSOR_DATA {
10358    #[doc = "Timestamp (time since system boot)."]
10359    pub time_boot_ms: u32,
10360    #[doc = "Minimum distance the sensor can measure"]
10361    pub min_distance: u16,
10362    #[doc = "Maximum distance the sensor can measure"]
10363    pub max_distance: u16,
10364    #[doc = "Current distance reading"]
10365    pub current_distance: u16,
10366    #[doc = "Type of distance sensor."]
10367    pub mavtype: MavDistanceSensor,
10368    #[doc = "Onboard ID of the sensor"]
10369    pub id: u8,
10370    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10371    pub orientation: MavSensorOrientation,
10372    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10373    pub covariance: u8,
10374    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10375    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10376    pub horizontal_fov: f32,
10377    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10378    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10379    pub vertical_fov: f32,
10380    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10381    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10382    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10383    pub quaternion: [f32; 4],
10384    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10385    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10386    pub signal_quality: u8,
10387}
10388impl DISTANCE_SENSOR_DATA {
10389    pub const ENCODED_LEN: usize = 39usize;
10390    pub const DEFAULT: Self = Self {
10391        time_boot_ms: 0_u32,
10392        min_distance: 0_u16,
10393        max_distance: 0_u16,
10394        current_distance: 0_u16,
10395        mavtype: MavDistanceSensor::DEFAULT,
10396        id: 0_u8,
10397        orientation: MavSensorOrientation::DEFAULT,
10398        covariance: 0_u8,
10399        horizontal_fov: 0.0_f32,
10400        vertical_fov: 0.0_f32,
10401        quaternion: [0.0_f32; 4usize],
10402        signal_quality: 0_u8,
10403    };
10404    #[cfg(feature = "arbitrary")]
10405    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10406        use arbitrary::{Arbitrary, Unstructured};
10407        let mut buf = [0u8; 1024];
10408        rng.fill_bytes(&mut buf);
10409        let mut unstructured = Unstructured::new(&buf);
10410        Self::arbitrary(&mut unstructured).unwrap_or_default()
10411    }
10412}
10413impl Default for DISTANCE_SENSOR_DATA {
10414    fn default() -> Self {
10415        Self::DEFAULT.clone()
10416    }
10417}
10418impl MessageData for DISTANCE_SENSOR_DATA {
10419    type Message = MavMessage;
10420    const ID: u32 = 132u32;
10421    const NAME: &'static str = "DISTANCE_SENSOR";
10422    const EXTRA_CRC: u8 = 85u8;
10423    const ENCODED_LEN: usize = 39usize;
10424    fn deser(
10425        _version: MavlinkVersion,
10426        __input: &[u8],
10427    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10428        let avail_len = __input.len();
10429        let mut payload_buf = [0; Self::ENCODED_LEN];
10430        let mut buf = if avail_len < Self::ENCODED_LEN {
10431            payload_buf[0..avail_len].copy_from_slice(__input);
10432            Bytes::new(&payload_buf)
10433        } else {
10434            Bytes::new(__input)
10435        };
10436        let mut __struct = Self::default();
10437        __struct.time_boot_ms = buf.get_u32_le();
10438        __struct.min_distance = buf.get_u16_le();
10439        __struct.max_distance = buf.get_u16_le();
10440        __struct.current_distance = buf.get_u16_le();
10441        let tmp = buf.get_u8();
10442        __struct.mavtype =
10443            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10444                enum_type: "MavDistanceSensor",
10445                value: tmp as u32,
10446            })?;
10447        __struct.id = buf.get_u8();
10448        let tmp = buf.get_u8();
10449        __struct.orientation =
10450            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10451                enum_type: "MavSensorOrientation",
10452                value: tmp as u32,
10453            })?;
10454        __struct.covariance = buf.get_u8();
10455        __struct.horizontal_fov = buf.get_f32_le();
10456        __struct.vertical_fov = buf.get_f32_le();
10457        for v in &mut __struct.quaternion {
10458            let val = buf.get_f32_le();
10459            *v = val;
10460        }
10461        __struct.signal_quality = buf.get_u8();
10462        Ok(__struct)
10463    }
10464    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10465        let mut __tmp = BytesMut::new(bytes);
10466        #[allow(clippy::absurd_extreme_comparisons)]
10467        #[allow(unused_comparisons)]
10468        if __tmp.remaining() < Self::ENCODED_LEN {
10469            panic!(
10470                "buffer is too small (need {} bytes, but got {})",
10471                Self::ENCODED_LEN,
10472                __tmp.remaining(),
10473            )
10474        }
10475        __tmp.put_u32_le(self.time_boot_ms);
10476        __tmp.put_u16_le(self.min_distance);
10477        __tmp.put_u16_le(self.max_distance);
10478        __tmp.put_u16_le(self.current_distance);
10479        __tmp.put_u8(self.mavtype as u8);
10480        __tmp.put_u8(self.id);
10481        __tmp.put_u8(self.orientation as u8);
10482        __tmp.put_u8(self.covariance);
10483        __tmp.put_f32_le(self.horizontal_fov);
10484        __tmp.put_f32_le(self.vertical_fov);
10485        for val in &self.quaternion {
10486            __tmp.put_f32_le(*val);
10487        }
10488        __tmp.put_u8(self.signal_quality);
10489        if matches!(version, MavlinkVersion::V2) {
10490            let len = __tmp.len();
10491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10492        } else {
10493            __tmp.len()
10494        }
10495    }
10496}
10497#[doc = "id: 225"]
10498#[doc = "EFI status output."]
10499#[derive(Debug, Clone, PartialEq)]
10500#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10502pub struct EFI_STATUS_DATA {
10503    #[doc = "ECU index"]
10504    pub ecu_index: f32,
10505    #[doc = "RPM"]
10506    pub rpm: f32,
10507    #[doc = "Fuel consumed"]
10508    pub fuel_consumed: f32,
10509    #[doc = "Fuel flow rate"]
10510    pub fuel_flow: f32,
10511    #[doc = "Engine load"]
10512    pub engine_load: f32,
10513    #[doc = "Throttle position"]
10514    pub throttle_position: f32,
10515    #[doc = "Spark dwell time"]
10516    pub spark_dwell_time: f32,
10517    #[doc = "Barometric pressure"]
10518    pub barometric_pressure: f32,
10519    #[doc = "Intake manifold pressure("]
10520    pub intake_manifold_pressure: f32,
10521    #[doc = "Intake manifold temperature"]
10522    pub intake_manifold_temperature: f32,
10523    #[doc = "Cylinder head temperature"]
10524    pub cylinder_head_temperature: f32,
10525    #[doc = "Ignition timing (Crank angle degrees)"]
10526    pub ignition_timing: f32,
10527    #[doc = "Injection time"]
10528    pub injection_time: f32,
10529    #[doc = "Exhaust gas temperature"]
10530    pub exhaust_gas_temperature: f32,
10531    #[doc = "Output throttle"]
10532    pub throttle_out: f32,
10533    #[doc = "Pressure/temperature compensation"]
10534    pub pt_compensation: f32,
10535    #[doc = "EFI health status"]
10536    pub health: u8,
10537    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10538    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10539    pub ignition_voltage: f32,
10540    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10541    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10542    pub fuel_pressure: f32,
10543}
10544impl EFI_STATUS_DATA {
10545    pub const ENCODED_LEN: usize = 73usize;
10546    pub const DEFAULT: Self = Self {
10547        ecu_index: 0.0_f32,
10548        rpm: 0.0_f32,
10549        fuel_consumed: 0.0_f32,
10550        fuel_flow: 0.0_f32,
10551        engine_load: 0.0_f32,
10552        throttle_position: 0.0_f32,
10553        spark_dwell_time: 0.0_f32,
10554        barometric_pressure: 0.0_f32,
10555        intake_manifold_pressure: 0.0_f32,
10556        intake_manifold_temperature: 0.0_f32,
10557        cylinder_head_temperature: 0.0_f32,
10558        ignition_timing: 0.0_f32,
10559        injection_time: 0.0_f32,
10560        exhaust_gas_temperature: 0.0_f32,
10561        throttle_out: 0.0_f32,
10562        pt_compensation: 0.0_f32,
10563        health: 0_u8,
10564        ignition_voltage: 0.0_f32,
10565        fuel_pressure: 0.0_f32,
10566    };
10567    #[cfg(feature = "arbitrary")]
10568    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10569        use arbitrary::{Arbitrary, Unstructured};
10570        let mut buf = [0u8; 1024];
10571        rng.fill_bytes(&mut buf);
10572        let mut unstructured = Unstructured::new(&buf);
10573        Self::arbitrary(&mut unstructured).unwrap_or_default()
10574    }
10575}
10576impl Default for EFI_STATUS_DATA {
10577    fn default() -> Self {
10578        Self::DEFAULT.clone()
10579    }
10580}
10581impl MessageData for EFI_STATUS_DATA {
10582    type Message = MavMessage;
10583    const ID: u32 = 225u32;
10584    const NAME: &'static str = "EFI_STATUS";
10585    const EXTRA_CRC: u8 = 208u8;
10586    const ENCODED_LEN: usize = 73usize;
10587    fn deser(
10588        _version: MavlinkVersion,
10589        __input: &[u8],
10590    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10591        let avail_len = __input.len();
10592        let mut payload_buf = [0; Self::ENCODED_LEN];
10593        let mut buf = if avail_len < Self::ENCODED_LEN {
10594            payload_buf[0..avail_len].copy_from_slice(__input);
10595            Bytes::new(&payload_buf)
10596        } else {
10597            Bytes::new(__input)
10598        };
10599        let mut __struct = Self::default();
10600        __struct.ecu_index = buf.get_f32_le();
10601        __struct.rpm = buf.get_f32_le();
10602        __struct.fuel_consumed = buf.get_f32_le();
10603        __struct.fuel_flow = buf.get_f32_le();
10604        __struct.engine_load = buf.get_f32_le();
10605        __struct.throttle_position = buf.get_f32_le();
10606        __struct.spark_dwell_time = buf.get_f32_le();
10607        __struct.barometric_pressure = buf.get_f32_le();
10608        __struct.intake_manifold_pressure = buf.get_f32_le();
10609        __struct.intake_manifold_temperature = buf.get_f32_le();
10610        __struct.cylinder_head_temperature = buf.get_f32_le();
10611        __struct.ignition_timing = buf.get_f32_le();
10612        __struct.injection_time = buf.get_f32_le();
10613        __struct.exhaust_gas_temperature = buf.get_f32_le();
10614        __struct.throttle_out = buf.get_f32_le();
10615        __struct.pt_compensation = buf.get_f32_le();
10616        __struct.health = buf.get_u8();
10617        __struct.ignition_voltage = buf.get_f32_le();
10618        __struct.fuel_pressure = buf.get_f32_le();
10619        Ok(__struct)
10620    }
10621    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10622        let mut __tmp = BytesMut::new(bytes);
10623        #[allow(clippy::absurd_extreme_comparisons)]
10624        #[allow(unused_comparisons)]
10625        if __tmp.remaining() < Self::ENCODED_LEN {
10626            panic!(
10627                "buffer is too small (need {} bytes, but got {})",
10628                Self::ENCODED_LEN,
10629                __tmp.remaining(),
10630            )
10631        }
10632        __tmp.put_f32_le(self.ecu_index);
10633        __tmp.put_f32_le(self.rpm);
10634        __tmp.put_f32_le(self.fuel_consumed);
10635        __tmp.put_f32_le(self.fuel_flow);
10636        __tmp.put_f32_le(self.engine_load);
10637        __tmp.put_f32_le(self.throttle_position);
10638        __tmp.put_f32_le(self.spark_dwell_time);
10639        __tmp.put_f32_le(self.barometric_pressure);
10640        __tmp.put_f32_le(self.intake_manifold_pressure);
10641        __tmp.put_f32_le(self.intake_manifold_temperature);
10642        __tmp.put_f32_le(self.cylinder_head_temperature);
10643        __tmp.put_f32_le(self.ignition_timing);
10644        __tmp.put_f32_le(self.injection_time);
10645        __tmp.put_f32_le(self.exhaust_gas_temperature);
10646        __tmp.put_f32_le(self.throttle_out);
10647        __tmp.put_f32_le(self.pt_compensation);
10648        __tmp.put_u8(self.health);
10649        __tmp.put_f32_le(self.ignition_voltage);
10650        __tmp.put_f32_le(self.fuel_pressure);
10651        if matches!(version, MavlinkVersion::V2) {
10652            let len = __tmp.len();
10653            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10654        } else {
10655            __tmp.len()
10656        }
10657    }
10658}
10659#[doc = "id: 131"]
10660#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10661#[derive(Debug, Clone, PartialEq)]
10662#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10663#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10664pub struct ENCAPSULATED_DATA_DATA {
10665    #[doc = "sequence number (starting with 0 on every transmission)"]
10666    pub seqnr: u16,
10667    #[doc = "image data bytes"]
10668    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10669    pub data: [u8; 253],
10670}
10671impl ENCAPSULATED_DATA_DATA {
10672    pub const ENCODED_LEN: usize = 255usize;
10673    pub const DEFAULT: Self = Self {
10674        seqnr: 0_u16,
10675        data: [0_u8; 253usize],
10676    };
10677    #[cfg(feature = "arbitrary")]
10678    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10679        use arbitrary::{Arbitrary, Unstructured};
10680        let mut buf = [0u8; 1024];
10681        rng.fill_bytes(&mut buf);
10682        let mut unstructured = Unstructured::new(&buf);
10683        Self::arbitrary(&mut unstructured).unwrap_or_default()
10684    }
10685}
10686impl Default for ENCAPSULATED_DATA_DATA {
10687    fn default() -> Self {
10688        Self::DEFAULT.clone()
10689    }
10690}
10691impl MessageData for ENCAPSULATED_DATA_DATA {
10692    type Message = MavMessage;
10693    const ID: u32 = 131u32;
10694    const NAME: &'static str = "ENCAPSULATED_DATA";
10695    const EXTRA_CRC: u8 = 223u8;
10696    const ENCODED_LEN: usize = 255usize;
10697    fn deser(
10698        _version: MavlinkVersion,
10699        __input: &[u8],
10700    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10701        let avail_len = __input.len();
10702        let mut payload_buf = [0; Self::ENCODED_LEN];
10703        let mut buf = if avail_len < Self::ENCODED_LEN {
10704            payload_buf[0..avail_len].copy_from_slice(__input);
10705            Bytes::new(&payload_buf)
10706        } else {
10707            Bytes::new(__input)
10708        };
10709        let mut __struct = Self::default();
10710        __struct.seqnr = buf.get_u16_le();
10711        for v in &mut __struct.data {
10712            let val = buf.get_u8();
10713            *v = val;
10714        }
10715        Ok(__struct)
10716    }
10717    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10718        let mut __tmp = BytesMut::new(bytes);
10719        #[allow(clippy::absurd_extreme_comparisons)]
10720        #[allow(unused_comparisons)]
10721        if __tmp.remaining() < Self::ENCODED_LEN {
10722            panic!(
10723                "buffer is too small (need {} bytes, but got {})",
10724                Self::ENCODED_LEN,
10725                __tmp.remaining(),
10726            )
10727        }
10728        __tmp.put_u16_le(self.seqnr);
10729        for val in &self.data {
10730            __tmp.put_u8(*val);
10731        }
10732        if matches!(version, MavlinkVersion::V2) {
10733            let len = __tmp.len();
10734            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10735        } else {
10736            __tmp.len()
10737        }
10738    }
10739}
10740#[doc = "id: 290"]
10741#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
10742#[derive(Debug, Clone, PartialEq)]
10743#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10744#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10745pub struct ESC_INFO_DATA {
10746    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10747    pub time_usec: u64,
10748    #[doc = "Number of reported errors by each ESC since boot."]
10749    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10750    pub error_count: [u32; 4],
10751    #[doc = "Counter of data packets received."]
10752    pub counter: u16,
10753    #[doc = "Bitmap of ESC failure flags."]
10754    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10755    pub failure_flags: [u16; 4],
10756    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
10757    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10758    pub temperature: [i16; 4],
10759    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10760    pub index: u8,
10761    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
10762    pub count: u8,
10763    #[doc = "Connection type protocol for all ESC."]
10764    pub connection_type: EscConnectionType,
10765    #[doc = "Information regarding online/offline status of each ESC."]
10766    pub info: u8,
10767}
10768impl ESC_INFO_DATA {
10769    pub const ENCODED_LEN: usize = 46usize;
10770    pub const DEFAULT: Self = Self {
10771        time_usec: 0_u64,
10772        error_count: [0_u32; 4usize],
10773        counter: 0_u16,
10774        failure_flags: [0_u16; 4usize],
10775        temperature: [0_i16; 4usize],
10776        index: 0_u8,
10777        count: 0_u8,
10778        connection_type: EscConnectionType::DEFAULT,
10779        info: 0_u8,
10780    };
10781    #[cfg(feature = "arbitrary")]
10782    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10783        use arbitrary::{Arbitrary, Unstructured};
10784        let mut buf = [0u8; 1024];
10785        rng.fill_bytes(&mut buf);
10786        let mut unstructured = Unstructured::new(&buf);
10787        Self::arbitrary(&mut unstructured).unwrap_or_default()
10788    }
10789}
10790impl Default for ESC_INFO_DATA {
10791    fn default() -> Self {
10792        Self::DEFAULT.clone()
10793    }
10794}
10795impl MessageData for ESC_INFO_DATA {
10796    type Message = MavMessage;
10797    const ID: u32 = 290u32;
10798    const NAME: &'static str = "ESC_INFO";
10799    const EXTRA_CRC: u8 = 251u8;
10800    const ENCODED_LEN: usize = 46usize;
10801    fn deser(
10802        _version: MavlinkVersion,
10803        __input: &[u8],
10804    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10805        let avail_len = __input.len();
10806        let mut payload_buf = [0; Self::ENCODED_LEN];
10807        let mut buf = if avail_len < Self::ENCODED_LEN {
10808            payload_buf[0..avail_len].copy_from_slice(__input);
10809            Bytes::new(&payload_buf)
10810        } else {
10811            Bytes::new(__input)
10812        };
10813        let mut __struct = Self::default();
10814        __struct.time_usec = buf.get_u64_le();
10815        for v in &mut __struct.error_count {
10816            let val = buf.get_u32_le();
10817            *v = val;
10818        }
10819        __struct.counter = buf.get_u16_le();
10820        for v in &mut __struct.failure_flags {
10821            let val = buf.get_u16_le();
10822            *v = val;
10823        }
10824        for v in &mut __struct.temperature {
10825            let val = buf.get_i16_le();
10826            *v = val;
10827        }
10828        __struct.index = buf.get_u8();
10829        __struct.count = buf.get_u8();
10830        let tmp = buf.get_u8();
10831        __struct.connection_type =
10832            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10833                enum_type: "EscConnectionType",
10834                value: tmp as u32,
10835            })?;
10836        __struct.info = buf.get_u8();
10837        Ok(__struct)
10838    }
10839    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10840        let mut __tmp = BytesMut::new(bytes);
10841        #[allow(clippy::absurd_extreme_comparisons)]
10842        #[allow(unused_comparisons)]
10843        if __tmp.remaining() < Self::ENCODED_LEN {
10844            panic!(
10845                "buffer is too small (need {} bytes, but got {})",
10846                Self::ENCODED_LEN,
10847                __tmp.remaining(),
10848            )
10849        }
10850        __tmp.put_u64_le(self.time_usec);
10851        for val in &self.error_count {
10852            __tmp.put_u32_le(*val);
10853        }
10854        __tmp.put_u16_le(self.counter);
10855        for val in &self.failure_flags {
10856            __tmp.put_u16_le(*val);
10857        }
10858        for val in &self.temperature {
10859            __tmp.put_i16_le(*val);
10860        }
10861        __tmp.put_u8(self.index);
10862        __tmp.put_u8(self.count);
10863        __tmp.put_u8(self.connection_type as u8);
10864        __tmp.put_u8(self.info);
10865        if matches!(version, MavlinkVersion::V2) {
10866            let len = __tmp.len();
10867            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10868        } else {
10869            __tmp.len()
10870        }
10871    }
10872}
10873#[doc = "id: 291"]
10874#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
10875#[derive(Debug, Clone, PartialEq)]
10876#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10877#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10878pub struct ESC_STATUS_DATA {
10879    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10880    pub time_usec: u64,
10881    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
10882    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10883    pub rpm: [i32; 4],
10884    #[doc = "Voltage measured from each ESC."]
10885    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10886    pub voltage: [f32; 4],
10887    #[doc = "Current measured from each ESC."]
10888    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10889    pub current: [f32; 4],
10890    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10891    pub index: u8,
10892}
10893impl ESC_STATUS_DATA {
10894    pub const ENCODED_LEN: usize = 57usize;
10895    pub const DEFAULT: Self = Self {
10896        time_usec: 0_u64,
10897        rpm: [0_i32; 4usize],
10898        voltage: [0.0_f32; 4usize],
10899        current: [0.0_f32; 4usize],
10900        index: 0_u8,
10901    };
10902    #[cfg(feature = "arbitrary")]
10903    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10904        use arbitrary::{Arbitrary, Unstructured};
10905        let mut buf = [0u8; 1024];
10906        rng.fill_bytes(&mut buf);
10907        let mut unstructured = Unstructured::new(&buf);
10908        Self::arbitrary(&mut unstructured).unwrap_or_default()
10909    }
10910}
10911impl Default for ESC_STATUS_DATA {
10912    fn default() -> Self {
10913        Self::DEFAULT.clone()
10914    }
10915}
10916impl MessageData for ESC_STATUS_DATA {
10917    type Message = MavMessage;
10918    const ID: u32 = 291u32;
10919    const NAME: &'static str = "ESC_STATUS";
10920    const EXTRA_CRC: u8 = 10u8;
10921    const ENCODED_LEN: usize = 57usize;
10922    fn deser(
10923        _version: MavlinkVersion,
10924        __input: &[u8],
10925    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10926        let avail_len = __input.len();
10927        let mut payload_buf = [0; Self::ENCODED_LEN];
10928        let mut buf = if avail_len < Self::ENCODED_LEN {
10929            payload_buf[0..avail_len].copy_from_slice(__input);
10930            Bytes::new(&payload_buf)
10931        } else {
10932            Bytes::new(__input)
10933        };
10934        let mut __struct = Self::default();
10935        __struct.time_usec = buf.get_u64_le();
10936        for v in &mut __struct.rpm {
10937            let val = buf.get_i32_le();
10938            *v = val;
10939        }
10940        for v in &mut __struct.voltage {
10941            let val = buf.get_f32_le();
10942            *v = val;
10943        }
10944        for v in &mut __struct.current {
10945            let val = buf.get_f32_le();
10946            *v = val;
10947        }
10948        __struct.index = buf.get_u8();
10949        Ok(__struct)
10950    }
10951    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10952        let mut __tmp = BytesMut::new(bytes);
10953        #[allow(clippy::absurd_extreme_comparisons)]
10954        #[allow(unused_comparisons)]
10955        if __tmp.remaining() < Self::ENCODED_LEN {
10956            panic!(
10957                "buffer is too small (need {} bytes, but got {})",
10958                Self::ENCODED_LEN,
10959                __tmp.remaining(),
10960            )
10961        }
10962        __tmp.put_u64_le(self.time_usec);
10963        for val in &self.rpm {
10964            __tmp.put_i32_le(*val);
10965        }
10966        for val in &self.voltage {
10967            __tmp.put_f32_le(*val);
10968        }
10969        for val in &self.current {
10970            __tmp.put_f32_le(*val);
10971        }
10972        __tmp.put_u8(self.index);
10973        if matches!(version, MavlinkVersion::V2) {
10974            let len = __tmp.len();
10975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10976        } else {
10977            __tmp.len()
10978        }
10979    }
10980}
10981#[doc = "id: 230"]
10982#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
10983#[derive(Debug, Clone, PartialEq)]
10984#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10985#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10986pub struct ESTIMATOR_STATUS_DATA {
10987    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10988    pub time_usec: u64,
10989    #[doc = "Velocity innovation test ratio"]
10990    pub vel_ratio: f32,
10991    #[doc = "Horizontal position innovation test ratio"]
10992    pub pos_horiz_ratio: f32,
10993    #[doc = "Vertical position innovation test ratio"]
10994    pub pos_vert_ratio: f32,
10995    #[doc = "Magnetometer innovation test ratio"]
10996    pub mag_ratio: f32,
10997    #[doc = "Height above terrain innovation test ratio"]
10998    pub hagl_ratio: f32,
10999    #[doc = "True airspeed innovation test ratio"]
11000    pub tas_ratio: f32,
11001    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11002    pub pos_horiz_accuracy: f32,
11003    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11004    pub pos_vert_accuracy: f32,
11005    #[doc = "Bitmap indicating which EKF outputs are valid."]
11006    pub flags: EstimatorStatusFlags,
11007}
11008impl ESTIMATOR_STATUS_DATA {
11009    pub const ENCODED_LEN: usize = 42usize;
11010    pub const DEFAULT: Self = Self {
11011        time_usec: 0_u64,
11012        vel_ratio: 0.0_f32,
11013        pos_horiz_ratio: 0.0_f32,
11014        pos_vert_ratio: 0.0_f32,
11015        mag_ratio: 0.0_f32,
11016        hagl_ratio: 0.0_f32,
11017        tas_ratio: 0.0_f32,
11018        pos_horiz_accuracy: 0.0_f32,
11019        pos_vert_accuracy: 0.0_f32,
11020        flags: EstimatorStatusFlags::DEFAULT,
11021    };
11022    #[cfg(feature = "arbitrary")]
11023    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11024        use arbitrary::{Arbitrary, Unstructured};
11025        let mut buf = [0u8; 1024];
11026        rng.fill_bytes(&mut buf);
11027        let mut unstructured = Unstructured::new(&buf);
11028        Self::arbitrary(&mut unstructured).unwrap_or_default()
11029    }
11030}
11031impl Default for ESTIMATOR_STATUS_DATA {
11032    fn default() -> Self {
11033        Self::DEFAULT.clone()
11034    }
11035}
11036impl MessageData for ESTIMATOR_STATUS_DATA {
11037    type Message = MavMessage;
11038    const ID: u32 = 230u32;
11039    const NAME: &'static str = "ESTIMATOR_STATUS";
11040    const EXTRA_CRC: u8 = 163u8;
11041    const ENCODED_LEN: usize = 42usize;
11042    fn deser(
11043        _version: MavlinkVersion,
11044        __input: &[u8],
11045    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11046        let avail_len = __input.len();
11047        let mut payload_buf = [0; Self::ENCODED_LEN];
11048        let mut buf = if avail_len < Self::ENCODED_LEN {
11049            payload_buf[0..avail_len].copy_from_slice(__input);
11050            Bytes::new(&payload_buf)
11051        } else {
11052            Bytes::new(__input)
11053        };
11054        let mut __struct = Self::default();
11055        __struct.time_usec = buf.get_u64_le();
11056        __struct.vel_ratio = buf.get_f32_le();
11057        __struct.pos_horiz_ratio = buf.get_f32_le();
11058        __struct.pos_vert_ratio = buf.get_f32_le();
11059        __struct.mag_ratio = buf.get_f32_le();
11060        __struct.hagl_ratio = buf.get_f32_le();
11061        __struct.tas_ratio = buf.get_f32_le();
11062        __struct.pos_horiz_accuracy = buf.get_f32_le();
11063        __struct.pos_vert_accuracy = buf.get_f32_le();
11064        let tmp = buf.get_u16_le();
11065        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
11066            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11067                flag_type: "EstimatorStatusFlags",
11068                value: tmp as u32,
11069            })?;
11070        Ok(__struct)
11071    }
11072    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11073        let mut __tmp = BytesMut::new(bytes);
11074        #[allow(clippy::absurd_extreme_comparisons)]
11075        #[allow(unused_comparisons)]
11076        if __tmp.remaining() < Self::ENCODED_LEN {
11077            panic!(
11078                "buffer is too small (need {} bytes, but got {})",
11079                Self::ENCODED_LEN,
11080                __tmp.remaining(),
11081            )
11082        }
11083        __tmp.put_u64_le(self.time_usec);
11084        __tmp.put_f32_le(self.vel_ratio);
11085        __tmp.put_f32_le(self.pos_horiz_ratio);
11086        __tmp.put_f32_le(self.pos_vert_ratio);
11087        __tmp.put_f32_le(self.mag_ratio);
11088        __tmp.put_f32_le(self.hagl_ratio);
11089        __tmp.put_f32_le(self.tas_ratio);
11090        __tmp.put_f32_le(self.pos_horiz_accuracy);
11091        __tmp.put_f32_le(self.pos_vert_accuracy);
11092        __tmp.put_u16_le(self.flags.bits());
11093        if matches!(version, MavlinkVersion::V2) {
11094            let len = __tmp.len();
11095            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11096        } else {
11097            __tmp.len()
11098        }
11099    }
11100}
11101#[doc = "id: 410"]
11102#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11103#[derive(Debug, Clone, PartialEq)]
11104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11105#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11106pub struct EVENT_DATA {
11107    #[doc = "Event ID (as defined in the component metadata)"]
11108    pub id: u32,
11109    #[doc = "Timestamp (time since system boot when the event happened)."]
11110    pub event_time_boot_ms: u32,
11111    #[doc = "Sequence number."]
11112    pub sequence: u16,
11113    #[doc = "Component ID"]
11114    pub destination_component: u8,
11115    #[doc = "System ID"]
11116    pub destination_system: u8,
11117    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11118    pub log_levels: u8,
11119    #[doc = "Arguments (depend on event ID)."]
11120    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11121    pub arguments: [u8; 40],
11122}
11123impl EVENT_DATA {
11124    pub const ENCODED_LEN: usize = 53usize;
11125    pub const DEFAULT: Self = Self {
11126        id: 0_u32,
11127        event_time_boot_ms: 0_u32,
11128        sequence: 0_u16,
11129        destination_component: 0_u8,
11130        destination_system: 0_u8,
11131        log_levels: 0_u8,
11132        arguments: [0_u8; 40usize],
11133    };
11134    #[cfg(feature = "arbitrary")]
11135    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11136        use arbitrary::{Arbitrary, Unstructured};
11137        let mut buf = [0u8; 1024];
11138        rng.fill_bytes(&mut buf);
11139        let mut unstructured = Unstructured::new(&buf);
11140        Self::arbitrary(&mut unstructured).unwrap_or_default()
11141    }
11142}
11143impl Default for EVENT_DATA {
11144    fn default() -> Self {
11145        Self::DEFAULT.clone()
11146    }
11147}
11148impl MessageData for EVENT_DATA {
11149    type Message = MavMessage;
11150    const ID: u32 = 410u32;
11151    const NAME: &'static str = "EVENT";
11152    const EXTRA_CRC: u8 = 160u8;
11153    const ENCODED_LEN: usize = 53usize;
11154    fn deser(
11155        _version: MavlinkVersion,
11156        __input: &[u8],
11157    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11158        let avail_len = __input.len();
11159        let mut payload_buf = [0; Self::ENCODED_LEN];
11160        let mut buf = if avail_len < Self::ENCODED_LEN {
11161            payload_buf[0..avail_len].copy_from_slice(__input);
11162            Bytes::new(&payload_buf)
11163        } else {
11164            Bytes::new(__input)
11165        };
11166        let mut __struct = Self::default();
11167        __struct.id = buf.get_u32_le();
11168        __struct.event_time_boot_ms = buf.get_u32_le();
11169        __struct.sequence = buf.get_u16_le();
11170        __struct.destination_component = buf.get_u8();
11171        __struct.destination_system = buf.get_u8();
11172        __struct.log_levels = buf.get_u8();
11173        for v in &mut __struct.arguments {
11174            let val = buf.get_u8();
11175            *v = val;
11176        }
11177        Ok(__struct)
11178    }
11179    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11180        let mut __tmp = BytesMut::new(bytes);
11181        #[allow(clippy::absurd_extreme_comparisons)]
11182        #[allow(unused_comparisons)]
11183        if __tmp.remaining() < Self::ENCODED_LEN {
11184            panic!(
11185                "buffer is too small (need {} bytes, but got {})",
11186                Self::ENCODED_LEN,
11187                __tmp.remaining(),
11188            )
11189        }
11190        __tmp.put_u32_le(self.id);
11191        __tmp.put_u32_le(self.event_time_boot_ms);
11192        __tmp.put_u16_le(self.sequence);
11193        __tmp.put_u8(self.destination_component);
11194        __tmp.put_u8(self.destination_system);
11195        __tmp.put_u8(self.log_levels);
11196        for val in &self.arguments {
11197            __tmp.put_u8(*val);
11198        }
11199        if matches!(version, MavlinkVersion::V2) {
11200            let len = __tmp.len();
11201            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11202        } else {
11203            __tmp.len()
11204        }
11205    }
11206}
11207#[doc = "id: 245"]
11208#[doc = "Provides state for additional features."]
11209#[derive(Debug, Clone, PartialEq)]
11210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11211#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11212pub struct EXTENDED_SYS_STATE_DATA {
11213    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11214    pub vtol_state: MavVtolState,
11215    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11216    pub landed_state: MavLandedState,
11217}
11218impl EXTENDED_SYS_STATE_DATA {
11219    pub const ENCODED_LEN: usize = 2usize;
11220    pub const DEFAULT: Self = Self {
11221        vtol_state: MavVtolState::DEFAULT,
11222        landed_state: MavLandedState::DEFAULT,
11223    };
11224    #[cfg(feature = "arbitrary")]
11225    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11226        use arbitrary::{Arbitrary, Unstructured};
11227        let mut buf = [0u8; 1024];
11228        rng.fill_bytes(&mut buf);
11229        let mut unstructured = Unstructured::new(&buf);
11230        Self::arbitrary(&mut unstructured).unwrap_or_default()
11231    }
11232}
11233impl Default for EXTENDED_SYS_STATE_DATA {
11234    fn default() -> Self {
11235        Self::DEFAULT.clone()
11236    }
11237}
11238impl MessageData for EXTENDED_SYS_STATE_DATA {
11239    type Message = MavMessage;
11240    const ID: u32 = 245u32;
11241    const NAME: &'static str = "EXTENDED_SYS_STATE";
11242    const EXTRA_CRC: u8 = 130u8;
11243    const ENCODED_LEN: usize = 2usize;
11244    fn deser(
11245        _version: MavlinkVersion,
11246        __input: &[u8],
11247    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11248        let avail_len = __input.len();
11249        let mut payload_buf = [0; Self::ENCODED_LEN];
11250        let mut buf = if avail_len < Self::ENCODED_LEN {
11251            payload_buf[0..avail_len].copy_from_slice(__input);
11252            Bytes::new(&payload_buf)
11253        } else {
11254            Bytes::new(__input)
11255        };
11256        let mut __struct = Self::default();
11257        let tmp = buf.get_u8();
11258        __struct.vtol_state =
11259            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11260                enum_type: "MavVtolState",
11261                value: tmp as u32,
11262            })?;
11263        let tmp = buf.get_u8();
11264        __struct.landed_state =
11265            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11266                enum_type: "MavLandedState",
11267                value: tmp as u32,
11268            })?;
11269        Ok(__struct)
11270    }
11271    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11272        let mut __tmp = BytesMut::new(bytes);
11273        #[allow(clippy::absurd_extreme_comparisons)]
11274        #[allow(unused_comparisons)]
11275        if __tmp.remaining() < Self::ENCODED_LEN {
11276            panic!(
11277                "buffer is too small (need {} bytes, but got {})",
11278                Self::ENCODED_LEN,
11279                __tmp.remaining(),
11280            )
11281        }
11282        __tmp.put_u8(self.vtol_state as u8);
11283        __tmp.put_u8(self.landed_state as u8);
11284        if matches!(version, MavlinkVersion::V2) {
11285            let len = __tmp.len();
11286            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11287        } else {
11288            __tmp.len()
11289        }
11290    }
11291}
11292#[doc = "id: 162"]
11293#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11294#[derive(Debug, Clone, PartialEq)]
11295#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11297pub struct FENCE_STATUS_DATA {
11298    #[doc = "Time (since boot) of last breach."]
11299    pub breach_time: u32,
11300    #[doc = "Number of fence breaches."]
11301    pub breach_count: u16,
11302    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11303    pub breach_status: u8,
11304    #[doc = "Last breach type."]
11305    pub breach_type: FenceBreach,
11306    #[doc = "Active action to prevent fence breach"]
11307    #[cfg_attr(feature = "serde", serde(default))]
11308    pub breach_mitigation: FenceMitigate,
11309}
11310impl FENCE_STATUS_DATA {
11311    pub const ENCODED_LEN: usize = 9usize;
11312    pub const DEFAULT: Self = Self {
11313        breach_time: 0_u32,
11314        breach_count: 0_u16,
11315        breach_status: 0_u8,
11316        breach_type: FenceBreach::DEFAULT,
11317        breach_mitigation: FenceMitigate::DEFAULT,
11318    };
11319    #[cfg(feature = "arbitrary")]
11320    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11321        use arbitrary::{Arbitrary, Unstructured};
11322        let mut buf = [0u8; 1024];
11323        rng.fill_bytes(&mut buf);
11324        let mut unstructured = Unstructured::new(&buf);
11325        Self::arbitrary(&mut unstructured).unwrap_or_default()
11326    }
11327}
11328impl Default for FENCE_STATUS_DATA {
11329    fn default() -> Self {
11330        Self::DEFAULT.clone()
11331    }
11332}
11333impl MessageData for FENCE_STATUS_DATA {
11334    type Message = MavMessage;
11335    const ID: u32 = 162u32;
11336    const NAME: &'static str = "FENCE_STATUS";
11337    const EXTRA_CRC: u8 = 189u8;
11338    const ENCODED_LEN: usize = 9usize;
11339    fn deser(
11340        _version: MavlinkVersion,
11341        __input: &[u8],
11342    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11343        let avail_len = __input.len();
11344        let mut payload_buf = [0; Self::ENCODED_LEN];
11345        let mut buf = if avail_len < Self::ENCODED_LEN {
11346            payload_buf[0..avail_len].copy_from_slice(__input);
11347            Bytes::new(&payload_buf)
11348        } else {
11349            Bytes::new(__input)
11350        };
11351        let mut __struct = Self::default();
11352        __struct.breach_time = buf.get_u32_le();
11353        __struct.breach_count = buf.get_u16_le();
11354        __struct.breach_status = buf.get_u8();
11355        let tmp = buf.get_u8();
11356        __struct.breach_type =
11357            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11358                enum_type: "FenceBreach",
11359                value: tmp as u32,
11360            })?;
11361        let tmp = buf.get_u8();
11362        __struct.breach_mitigation =
11363            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11364                enum_type: "FenceMitigate",
11365                value: tmp as u32,
11366            })?;
11367        Ok(__struct)
11368    }
11369    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11370        let mut __tmp = BytesMut::new(bytes);
11371        #[allow(clippy::absurd_extreme_comparisons)]
11372        #[allow(unused_comparisons)]
11373        if __tmp.remaining() < Self::ENCODED_LEN {
11374            panic!(
11375                "buffer is too small (need {} bytes, but got {})",
11376                Self::ENCODED_LEN,
11377                __tmp.remaining(),
11378            )
11379        }
11380        __tmp.put_u32_le(self.breach_time);
11381        __tmp.put_u16_le(self.breach_count);
11382        __tmp.put_u8(self.breach_status);
11383        __tmp.put_u8(self.breach_type as u8);
11384        __tmp.put_u8(self.breach_mitigation as u8);
11385        if matches!(version, MavlinkVersion::V2) {
11386            let len = __tmp.len();
11387            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11388        } else {
11389            __tmp.len()
11390        }
11391    }
11392}
11393#[doc = "id: 110"]
11394#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11395#[derive(Debug, Clone, PartialEq)]
11396#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11397#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11398pub struct FILE_TRANSFER_PROTOCOL_DATA {
11399    #[doc = "Network ID (0 for broadcast)"]
11400    pub target_network: u8,
11401    #[doc = "System ID (0 for broadcast)"]
11402    pub target_system: u8,
11403    #[doc = "Component ID (0 for broadcast)"]
11404    pub target_component: u8,
11405    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11406    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11407    pub payload: [u8; 251],
11408}
11409impl FILE_TRANSFER_PROTOCOL_DATA {
11410    pub const ENCODED_LEN: usize = 254usize;
11411    pub const DEFAULT: Self = Self {
11412        target_network: 0_u8,
11413        target_system: 0_u8,
11414        target_component: 0_u8,
11415        payload: [0_u8; 251usize],
11416    };
11417    #[cfg(feature = "arbitrary")]
11418    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11419        use arbitrary::{Arbitrary, Unstructured};
11420        let mut buf = [0u8; 1024];
11421        rng.fill_bytes(&mut buf);
11422        let mut unstructured = Unstructured::new(&buf);
11423        Self::arbitrary(&mut unstructured).unwrap_or_default()
11424    }
11425}
11426impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11427    fn default() -> Self {
11428        Self::DEFAULT.clone()
11429    }
11430}
11431impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11432    type Message = MavMessage;
11433    const ID: u32 = 110u32;
11434    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11435    const EXTRA_CRC: u8 = 84u8;
11436    const ENCODED_LEN: usize = 254usize;
11437    fn deser(
11438        _version: MavlinkVersion,
11439        __input: &[u8],
11440    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11441        let avail_len = __input.len();
11442        let mut payload_buf = [0; Self::ENCODED_LEN];
11443        let mut buf = if avail_len < Self::ENCODED_LEN {
11444            payload_buf[0..avail_len].copy_from_slice(__input);
11445            Bytes::new(&payload_buf)
11446        } else {
11447            Bytes::new(__input)
11448        };
11449        let mut __struct = Self::default();
11450        __struct.target_network = buf.get_u8();
11451        __struct.target_system = buf.get_u8();
11452        __struct.target_component = buf.get_u8();
11453        for v in &mut __struct.payload {
11454            let val = buf.get_u8();
11455            *v = val;
11456        }
11457        Ok(__struct)
11458    }
11459    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11460        let mut __tmp = BytesMut::new(bytes);
11461        #[allow(clippy::absurd_extreme_comparisons)]
11462        #[allow(unused_comparisons)]
11463        if __tmp.remaining() < Self::ENCODED_LEN {
11464            panic!(
11465                "buffer is too small (need {} bytes, but got {})",
11466                Self::ENCODED_LEN,
11467                __tmp.remaining(),
11468            )
11469        }
11470        __tmp.put_u8(self.target_network);
11471        __tmp.put_u8(self.target_system);
11472        __tmp.put_u8(self.target_component);
11473        for val in &self.payload {
11474            __tmp.put_u8(*val);
11475        }
11476        if matches!(version, MavlinkVersion::V2) {
11477            let len = __tmp.len();
11478            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11479        } else {
11480            __tmp.len()
11481        }
11482    }
11483}
11484#[doc = "id: 152"]
11485#[doc = "Flexifunction type and parameters for component at function index from buffer."]
11486#[derive(Debug, Clone, PartialEq)]
11487#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11488#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11489pub struct FLEXIFUNCTION_BUFFER_FUNCTION_DATA {
11490    #[doc = "Function index"]
11491    pub func_index: u16,
11492    #[doc = "Total count of functions"]
11493    pub func_count: u16,
11494    #[doc = "Address in the flexifunction data, Set to 0xFFFF to use address in target memory"]
11495    pub data_address: u16,
11496    #[doc = "Size of the"]
11497    pub data_size: u16,
11498    #[doc = "System ID"]
11499    pub target_system: u8,
11500    #[doc = "Component ID"]
11501    pub target_component: u8,
11502    #[doc = "Settings data"]
11503    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11504    pub data: [i8; 48],
11505}
11506impl FLEXIFUNCTION_BUFFER_FUNCTION_DATA {
11507    pub const ENCODED_LEN: usize = 58usize;
11508    pub const DEFAULT: Self = Self {
11509        func_index: 0_u16,
11510        func_count: 0_u16,
11511        data_address: 0_u16,
11512        data_size: 0_u16,
11513        target_system: 0_u8,
11514        target_component: 0_u8,
11515        data: [0_i8; 48usize],
11516    };
11517    #[cfg(feature = "arbitrary")]
11518    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11519        use arbitrary::{Arbitrary, Unstructured};
11520        let mut buf = [0u8; 1024];
11521        rng.fill_bytes(&mut buf);
11522        let mut unstructured = Unstructured::new(&buf);
11523        Self::arbitrary(&mut unstructured).unwrap_or_default()
11524    }
11525}
11526impl Default for FLEXIFUNCTION_BUFFER_FUNCTION_DATA {
11527    fn default() -> Self {
11528        Self::DEFAULT.clone()
11529    }
11530}
11531impl MessageData for FLEXIFUNCTION_BUFFER_FUNCTION_DATA {
11532    type Message = MavMessage;
11533    const ID: u32 = 152u32;
11534    const NAME: &'static str = "FLEXIFUNCTION_BUFFER_FUNCTION";
11535    const EXTRA_CRC: u8 = 101u8;
11536    const ENCODED_LEN: usize = 58usize;
11537    fn deser(
11538        _version: MavlinkVersion,
11539        __input: &[u8],
11540    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11541        let avail_len = __input.len();
11542        let mut payload_buf = [0; Self::ENCODED_LEN];
11543        let mut buf = if avail_len < Self::ENCODED_LEN {
11544            payload_buf[0..avail_len].copy_from_slice(__input);
11545            Bytes::new(&payload_buf)
11546        } else {
11547            Bytes::new(__input)
11548        };
11549        let mut __struct = Self::default();
11550        __struct.func_index = buf.get_u16_le();
11551        __struct.func_count = buf.get_u16_le();
11552        __struct.data_address = buf.get_u16_le();
11553        __struct.data_size = buf.get_u16_le();
11554        __struct.target_system = buf.get_u8();
11555        __struct.target_component = buf.get_u8();
11556        for v in &mut __struct.data {
11557            let val = buf.get_i8();
11558            *v = val;
11559        }
11560        Ok(__struct)
11561    }
11562    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11563        let mut __tmp = BytesMut::new(bytes);
11564        #[allow(clippy::absurd_extreme_comparisons)]
11565        #[allow(unused_comparisons)]
11566        if __tmp.remaining() < Self::ENCODED_LEN {
11567            panic!(
11568                "buffer is too small (need {} bytes, but got {})",
11569                Self::ENCODED_LEN,
11570                __tmp.remaining(),
11571            )
11572        }
11573        __tmp.put_u16_le(self.func_index);
11574        __tmp.put_u16_le(self.func_count);
11575        __tmp.put_u16_le(self.data_address);
11576        __tmp.put_u16_le(self.data_size);
11577        __tmp.put_u8(self.target_system);
11578        __tmp.put_u8(self.target_component);
11579        for val in &self.data {
11580            __tmp.put_i8(*val);
11581        }
11582        if matches!(version, MavlinkVersion::V2) {
11583            let len = __tmp.len();
11584            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11585        } else {
11586            __tmp.len()
11587        }
11588    }
11589}
11590#[doc = "id: 153"]
11591#[doc = "Flexifunction type and parameters for component at function index from buffer."]
11592#[derive(Debug, Clone, PartialEq)]
11593#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11594#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11595pub struct FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA {
11596    #[doc = "Function index"]
11597    pub func_index: u16,
11598    #[doc = "result of acknowledge, 0=fail, 1=good"]
11599    pub result: u16,
11600    #[doc = "System ID"]
11601    pub target_system: u8,
11602    #[doc = "Component ID"]
11603    pub target_component: u8,
11604}
11605impl FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA {
11606    pub const ENCODED_LEN: usize = 6usize;
11607    pub const DEFAULT: Self = Self {
11608        func_index: 0_u16,
11609        result: 0_u16,
11610        target_system: 0_u8,
11611        target_component: 0_u8,
11612    };
11613    #[cfg(feature = "arbitrary")]
11614    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11615        use arbitrary::{Arbitrary, Unstructured};
11616        let mut buf = [0u8; 1024];
11617        rng.fill_bytes(&mut buf);
11618        let mut unstructured = Unstructured::new(&buf);
11619        Self::arbitrary(&mut unstructured).unwrap_or_default()
11620    }
11621}
11622impl Default for FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA {
11623    fn default() -> Self {
11624        Self::DEFAULT.clone()
11625    }
11626}
11627impl MessageData for FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA {
11628    type Message = MavMessage;
11629    const ID: u32 = 153u32;
11630    const NAME: &'static str = "FLEXIFUNCTION_BUFFER_FUNCTION_ACK";
11631    const EXTRA_CRC: u8 = 109u8;
11632    const ENCODED_LEN: usize = 6usize;
11633    fn deser(
11634        _version: MavlinkVersion,
11635        __input: &[u8],
11636    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11637        let avail_len = __input.len();
11638        let mut payload_buf = [0; Self::ENCODED_LEN];
11639        let mut buf = if avail_len < Self::ENCODED_LEN {
11640            payload_buf[0..avail_len].copy_from_slice(__input);
11641            Bytes::new(&payload_buf)
11642        } else {
11643            Bytes::new(__input)
11644        };
11645        let mut __struct = Self::default();
11646        __struct.func_index = buf.get_u16_le();
11647        __struct.result = buf.get_u16_le();
11648        __struct.target_system = buf.get_u8();
11649        __struct.target_component = buf.get_u8();
11650        Ok(__struct)
11651    }
11652    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11653        let mut __tmp = BytesMut::new(bytes);
11654        #[allow(clippy::absurd_extreme_comparisons)]
11655        #[allow(unused_comparisons)]
11656        if __tmp.remaining() < Self::ENCODED_LEN {
11657            panic!(
11658                "buffer is too small (need {} bytes, but got {})",
11659                Self::ENCODED_LEN,
11660                __tmp.remaining(),
11661            )
11662        }
11663        __tmp.put_u16_le(self.func_index);
11664        __tmp.put_u16_le(self.result);
11665        __tmp.put_u8(self.target_system);
11666        __tmp.put_u8(self.target_component);
11667        if matches!(version, MavlinkVersion::V2) {
11668            let len = __tmp.len();
11669            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11670        } else {
11671            __tmp.len()
11672        }
11673    }
11674}
11675#[doc = "id: 157"]
11676#[doc = "Acknowldge success or failure of a flexifunction command."]
11677#[derive(Debug, Clone, PartialEq)]
11678#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11679#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11680pub struct FLEXIFUNCTION_COMMAND_DATA {
11681    #[doc = "System ID"]
11682    pub target_system: u8,
11683    #[doc = "Component ID"]
11684    pub target_component: u8,
11685    #[doc = "Flexifunction command type"]
11686    pub command_type: u8,
11687}
11688impl FLEXIFUNCTION_COMMAND_DATA {
11689    pub const ENCODED_LEN: usize = 3usize;
11690    pub const DEFAULT: Self = Self {
11691        target_system: 0_u8,
11692        target_component: 0_u8,
11693        command_type: 0_u8,
11694    };
11695    #[cfg(feature = "arbitrary")]
11696    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11697        use arbitrary::{Arbitrary, Unstructured};
11698        let mut buf = [0u8; 1024];
11699        rng.fill_bytes(&mut buf);
11700        let mut unstructured = Unstructured::new(&buf);
11701        Self::arbitrary(&mut unstructured).unwrap_or_default()
11702    }
11703}
11704impl Default for FLEXIFUNCTION_COMMAND_DATA {
11705    fn default() -> Self {
11706        Self::DEFAULT.clone()
11707    }
11708}
11709impl MessageData for FLEXIFUNCTION_COMMAND_DATA {
11710    type Message = MavMessage;
11711    const ID: u32 = 157u32;
11712    const NAME: &'static str = "FLEXIFUNCTION_COMMAND";
11713    const EXTRA_CRC: u8 = 133u8;
11714    const ENCODED_LEN: usize = 3usize;
11715    fn deser(
11716        _version: MavlinkVersion,
11717        __input: &[u8],
11718    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11719        let avail_len = __input.len();
11720        let mut payload_buf = [0; Self::ENCODED_LEN];
11721        let mut buf = if avail_len < Self::ENCODED_LEN {
11722            payload_buf[0..avail_len].copy_from_slice(__input);
11723            Bytes::new(&payload_buf)
11724        } else {
11725            Bytes::new(__input)
11726        };
11727        let mut __struct = Self::default();
11728        __struct.target_system = buf.get_u8();
11729        __struct.target_component = buf.get_u8();
11730        __struct.command_type = buf.get_u8();
11731        Ok(__struct)
11732    }
11733    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11734        let mut __tmp = BytesMut::new(bytes);
11735        #[allow(clippy::absurd_extreme_comparisons)]
11736        #[allow(unused_comparisons)]
11737        if __tmp.remaining() < Self::ENCODED_LEN {
11738            panic!(
11739                "buffer is too small (need {} bytes, but got {})",
11740                Self::ENCODED_LEN,
11741                __tmp.remaining(),
11742            )
11743        }
11744        __tmp.put_u8(self.target_system);
11745        __tmp.put_u8(self.target_component);
11746        __tmp.put_u8(self.command_type);
11747        if matches!(version, MavlinkVersion::V2) {
11748            let len = __tmp.len();
11749            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11750        } else {
11751            __tmp.len()
11752        }
11753    }
11754}
11755#[doc = "id: 158"]
11756#[doc = "Acknowldge success or failure of a flexifunction command."]
11757#[derive(Debug, Clone, PartialEq)]
11758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11759#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11760pub struct FLEXIFUNCTION_COMMAND_ACK_DATA {
11761    #[doc = "Command acknowledged"]
11762    pub command_type: u16,
11763    #[doc = "result of acknowledge"]
11764    pub result: u16,
11765}
11766impl FLEXIFUNCTION_COMMAND_ACK_DATA {
11767    pub const ENCODED_LEN: usize = 4usize;
11768    pub const DEFAULT: Self = Self {
11769        command_type: 0_u16,
11770        result: 0_u16,
11771    };
11772    #[cfg(feature = "arbitrary")]
11773    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11774        use arbitrary::{Arbitrary, Unstructured};
11775        let mut buf = [0u8; 1024];
11776        rng.fill_bytes(&mut buf);
11777        let mut unstructured = Unstructured::new(&buf);
11778        Self::arbitrary(&mut unstructured).unwrap_or_default()
11779    }
11780}
11781impl Default for FLEXIFUNCTION_COMMAND_ACK_DATA {
11782    fn default() -> Self {
11783        Self::DEFAULT.clone()
11784    }
11785}
11786impl MessageData for FLEXIFUNCTION_COMMAND_ACK_DATA {
11787    type Message = MavMessage;
11788    const ID: u32 = 158u32;
11789    const NAME: &'static str = "FLEXIFUNCTION_COMMAND_ACK";
11790    const EXTRA_CRC: u8 = 208u8;
11791    const ENCODED_LEN: usize = 4usize;
11792    fn deser(
11793        _version: MavlinkVersion,
11794        __input: &[u8],
11795    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11796        let avail_len = __input.len();
11797        let mut payload_buf = [0; Self::ENCODED_LEN];
11798        let mut buf = if avail_len < Self::ENCODED_LEN {
11799            payload_buf[0..avail_len].copy_from_slice(__input);
11800            Bytes::new(&payload_buf)
11801        } else {
11802            Bytes::new(__input)
11803        };
11804        let mut __struct = Self::default();
11805        __struct.command_type = buf.get_u16_le();
11806        __struct.result = buf.get_u16_le();
11807        Ok(__struct)
11808    }
11809    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11810        let mut __tmp = BytesMut::new(bytes);
11811        #[allow(clippy::absurd_extreme_comparisons)]
11812        #[allow(unused_comparisons)]
11813        if __tmp.remaining() < Self::ENCODED_LEN {
11814            panic!(
11815                "buffer is too small (need {} bytes, but got {})",
11816                Self::ENCODED_LEN,
11817                __tmp.remaining(),
11818            )
11819        }
11820        __tmp.put_u16_le(self.command_type);
11821        __tmp.put_u16_le(self.result);
11822        if matches!(version, MavlinkVersion::V2) {
11823            let len = __tmp.len();
11824            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11825        } else {
11826            __tmp.len()
11827        }
11828    }
11829}
11830#[doc = "id: 155"]
11831#[doc = "Acknowldge success or failure of a flexifunction command."]
11832#[derive(Debug, Clone, PartialEq)]
11833#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11834#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11835pub struct FLEXIFUNCTION_DIRECTORY_DATA {
11836    #[doc = "System ID"]
11837    pub target_system: u8,
11838    #[doc = "Component ID"]
11839    pub target_component: u8,
11840    #[doc = "0=inputs, 1=outputs"]
11841    pub directory_type: u8,
11842    #[doc = "index of first directory entry to write"]
11843    pub start_index: u8,
11844    #[doc = "count of directory entries to write"]
11845    pub count: u8,
11846    #[doc = "Settings data"]
11847    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11848    pub directory_data: [i8; 48],
11849}
11850impl FLEXIFUNCTION_DIRECTORY_DATA {
11851    pub const ENCODED_LEN: usize = 53usize;
11852    pub const DEFAULT: Self = Self {
11853        target_system: 0_u8,
11854        target_component: 0_u8,
11855        directory_type: 0_u8,
11856        start_index: 0_u8,
11857        count: 0_u8,
11858        directory_data: [0_i8; 48usize],
11859    };
11860    #[cfg(feature = "arbitrary")]
11861    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11862        use arbitrary::{Arbitrary, Unstructured};
11863        let mut buf = [0u8; 1024];
11864        rng.fill_bytes(&mut buf);
11865        let mut unstructured = Unstructured::new(&buf);
11866        Self::arbitrary(&mut unstructured).unwrap_or_default()
11867    }
11868}
11869impl Default for FLEXIFUNCTION_DIRECTORY_DATA {
11870    fn default() -> Self {
11871        Self::DEFAULT.clone()
11872    }
11873}
11874impl MessageData for FLEXIFUNCTION_DIRECTORY_DATA {
11875    type Message = MavMessage;
11876    const ID: u32 = 155u32;
11877    const NAME: &'static str = "FLEXIFUNCTION_DIRECTORY";
11878    const EXTRA_CRC: u8 = 12u8;
11879    const ENCODED_LEN: usize = 53usize;
11880    fn deser(
11881        _version: MavlinkVersion,
11882        __input: &[u8],
11883    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11884        let avail_len = __input.len();
11885        let mut payload_buf = [0; Self::ENCODED_LEN];
11886        let mut buf = if avail_len < Self::ENCODED_LEN {
11887            payload_buf[0..avail_len].copy_from_slice(__input);
11888            Bytes::new(&payload_buf)
11889        } else {
11890            Bytes::new(__input)
11891        };
11892        let mut __struct = Self::default();
11893        __struct.target_system = buf.get_u8();
11894        __struct.target_component = buf.get_u8();
11895        __struct.directory_type = buf.get_u8();
11896        __struct.start_index = buf.get_u8();
11897        __struct.count = buf.get_u8();
11898        for v in &mut __struct.directory_data {
11899            let val = buf.get_i8();
11900            *v = val;
11901        }
11902        Ok(__struct)
11903    }
11904    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11905        let mut __tmp = BytesMut::new(bytes);
11906        #[allow(clippy::absurd_extreme_comparisons)]
11907        #[allow(unused_comparisons)]
11908        if __tmp.remaining() < Self::ENCODED_LEN {
11909            panic!(
11910                "buffer is too small (need {} bytes, but got {})",
11911                Self::ENCODED_LEN,
11912                __tmp.remaining(),
11913            )
11914        }
11915        __tmp.put_u8(self.target_system);
11916        __tmp.put_u8(self.target_component);
11917        __tmp.put_u8(self.directory_type);
11918        __tmp.put_u8(self.start_index);
11919        __tmp.put_u8(self.count);
11920        for val in &self.directory_data {
11921            __tmp.put_i8(*val);
11922        }
11923        if matches!(version, MavlinkVersion::V2) {
11924            let len = __tmp.len();
11925            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11926        } else {
11927            __tmp.len()
11928        }
11929    }
11930}
11931#[doc = "id: 156"]
11932#[doc = "Acknowldge success or failure of a flexifunction command."]
11933#[derive(Debug, Clone, PartialEq)]
11934#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11935#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11936pub struct FLEXIFUNCTION_DIRECTORY_ACK_DATA {
11937    #[doc = "result of acknowledge, 0=fail, 1=good"]
11938    pub result: u16,
11939    #[doc = "System ID"]
11940    pub target_system: u8,
11941    #[doc = "Component ID"]
11942    pub target_component: u8,
11943    #[doc = "0=inputs, 1=outputs"]
11944    pub directory_type: u8,
11945    #[doc = "index of first directory entry to write"]
11946    pub start_index: u8,
11947    #[doc = "count of directory entries to write"]
11948    pub count: u8,
11949}
11950impl FLEXIFUNCTION_DIRECTORY_ACK_DATA {
11951    pub const ENCODED_LEN: usize = 7usize;
11952    pub const DEFAULT: Self = Self {
11953        result: 0_u16,
11954        target_system: 0_u8,
11955        target_component: 0_u8,
11956        directory_type: 0_u8,
11957        start_index: 0_u8,
11958        count: 0_u8,
11959    };
11960    #[cfg(feature = "arbitrary")]
11961    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11962        use arbitrary::{Arbitrary, Unstructured};
11963        let mut buf = [0u8; 1024];
11964        rng.fill_bytes(&mut buf);
11965        let mut unstructured = Unstructured::new(&buf);
11966        Self::arbitrary(&mut unstructured).unwrap_or_default()
11967    }
11968}
11969impl Default for FLEXIFUNCTION_DIRECTORY_ACK_DATA {
11970    fn default() -> Self {
11971        Self::DEFAULT.clone()
11972    }
11973}
11974impl MessageData for FLEXIFUNCTION_DIRECTORY_ACK_DATA {
11975    type Message = MavMessage;
11976    const ID: u32 = 156u32;
11977    const NAME: &'static str = "FLEXIFUNCTION_DIRECTORY_ACK";
11978    const EXTRA_CRC: u8 = 218u8;
11979    const ENCODED_LEN: usize = 7usize;
11980    fn deser(
11981        _version: MavlinkVersion,
11982        __input: &[u8],
11983    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11984        let avail_len = __input.len();
11985        let mut payload_buf = [0; Self::ENCODED_LEN];
11986        let mut buf = if avail_len < Self::ENCODED_LEN {
11987            payload_buf[0..avail_len].copy_from_slice(__input);
11988            Bytes::new(&payload_buf)
11989        } else {
11990            Bytes::new(__input)
11991        };
11992        let mut __struct = Self::default();
11993        __struct.result = buf.get_u16_le();
11994        __struct.target_system = buf.get_u8();
11995        __struct.target_component = buf.get_u8();
11996        __struct.directory_type = buf.get_u8();
11997        __struct.start_index = buf.get_u8();
11998        __struct.count = buf.get_u8();
11999        Ok(__struct)
12000    }
12001    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12002        let mut __tmp = BytesMut::new(bytes);
12003        #[allow(clippy::absurd_extreme_comparisons)]
12004        #[allow(unused_comparisons)]
12005        if __tmp.remaining() < Self::ENCODED_LEN {
12006            panic!(
12007                "buffer is too small (need {} bytes, but got {})",
12008                Self::ENCODED_LEN,
12009                __tmp.remaining(),
12010            )
12011        }
12012        __tmp.put_u16_le(self.result);
12013        __tmp.put_u8(self.target_system);
12014        __tmp.put_u8(self.target_component);
12015        __tmp.put_u8(self.directory_type);
12016        __tmp.put_u8(self.start_index);
12017        __tmp.put_u8(self.count);
12018        if matches!(version, MavlinkVersion::V2) {
12019            let len = __tmp.len();
12020            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12021        } else {
12022            __tmp.len()
12023        }
12024    }
12025}
12026#[doc = "id: 151"]
12027#[doc = "Request reading of flexifunction data."]
12028#[derive(Debug, Clone, PartialEq)]
12029#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12030#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12031pub struct FLEXIFUNCTION_READ_REQ_DATA {
12032    #[doc = "Type of flexifunction data requested"]
12033    pub read_req_type: i16,
12034    #[doc = "index into data where needed"]
12035    pub data_index: i16,
12036    #[doc = "System ID"]
12037    pub target_system: u8,
12038    #[doc = "Component ID"]
12039    pub target_component: u8,
12040}
12041impl FLEXIFUNCTION_READ_REQ_DATA {
12042    pub const ENCODED_LEN: usize = 6usize;
12043    pub const DEFAULT: Self = Self {
12044        read_req_type: 0_i16,
12045        data_index: 0_i16,
12046        target_system: 0_u8,
12047        target_component: 0_u8,
12048    };
12049    #[cfg(feature = "arbitrary")]
12050    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12051        use arbitrary::{Arbitrary, Unstructured};
12052        let mut buf = [0u8; 1024];
12053        rng.fill_bytes(&mut buf);
12054        let mut unstructured = Unstructured::new(&buf);
12055        Self::arbitrary(&mut unstructured).unwrap_or_default()
12056    }
12057}
12058impl Default for FLEXIFUNCTION_READ_REQ_DATA {
12059    fn default() -> Self {
12060        Self::DEFAULT.clone()
12061    }
12062}
12063impl MessageData for FLEXIFUNCTION_READ_REQ_DATA {
12064    type Message = MavMessage;
12065    const ID: u32 = 151u32;
12066    const NAME: &'static str = "FLEXIFUNCTION_READ_REQ";
12067    const EXTRA_CRC: u8 = 26u8;
12068    const ENCODED_LEN: usize = 6usize;
12069    fn deser(
12070        _version: MavlinkVersion,
12071        __input: &[u8],
12072    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12073        let avail_len = __input.len();
12074        let mut payload_buf = [0; Self::ENCODED_LEN];
12075        let mut buf = if avail_len < Self::ENCODED_LEN {
12076            payload_buf[0..avail_len].copy_from_slice(__input);
12077            Bytes::new(&payload_buf)
12078        } else {
12079            Bytes::new(__input)
12080        };
12081        let mut __struct = Self::default();
12082        __struct.read_req_type = buf.get_i16_le();
12083        __struct.data_index = buf.get_i16_le();
12084        __struct.target_system = buf.get_u8();
12085        __struct.target_component = buf.get_u8();
12086        Ok(__struct)
12087    }
12088    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12089        let mut __tmp = BytesMut::new(bytes);
12090        #[allow(clippy::absurd_extreme_comparisons)]
12091        #[allow(unused_comparisons)]
12092        if __tmp.remaining() < Self::ENCODED_LEN {
12093            panic!(
12094                "buffer is too small (need {} bytes, but got {})",
12095                Self::ENCODED_LEN,
12096                __tmp.remaining(),
12097            )
12098        }
12099        __tmp.put_i16_le(self.read_req_type);
12100        __tmp.put_i16_le(self.data_index);
12101        __tmp.put_u8(self.target_system);
12102        __tmp.put_u8(self.target_component);
12103        if matches!(version, MavlinkVersion::V2) {
12104            let len = __tmp.len();
12105            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12106        } else {
12107            __tmp.len()
12108        }
12109    }
12110}
12111#[doc = "id: 150"]
12112#[doc = "Depreciated but used as a compiler flag.  Do not remove."]
12113#[derive(Debug, Clone, PartialEq)]
12114#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12115#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12116pub struct FLEXIFUNCTION_SET_DATA {
12117    #[doc = "System ID"]
12118    pub target_system: u8,
12119    #[doc = "Component ID"]
12120    pub target_component: u8,
12121}
12122impl FLEXIFUNCTION_SET_DATA {
12123    pub const ENCODED_LEN: usize = 2usize;
12124    pub const DEFAULT: Self = Self {
12125        target_system: 0_u8,
12126        target_component: 0_u8,
12127    };
12128    #[cfg(feature = "arbitrary")]
12129    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12130        use arbitrary::{Arbitrary, Unstructured};
12131        let mut buf = [0u8; 1024];
12132        rng.fill_bytes(&mut buf);
12133        let mut unstructured = Unstructured::new(&buf);
12134        Self::arbitrary(&mut unstructured).unwrap_or_default()
12135    }
12136}
12137impl Default for FLEXIFUNCTION_SET_DATA {
12138    fn default() -> Self {
12139        Self::DEFAULT.clone()
12140    }
12141}
12142impl MessageData for FLEXIFUNCTION_SET_DATA {
12143    type Message = MavMessage;
12144    const ID: u32 = 150u32;
12145    const NAME: &'static str = "FLEXIFUNCTION_SET";
12146    const EXTRA_CRC: u8 = 181u8;
12147    const ENCODED_LEN: usize = 2usize;
12148    fn deser(
12149        _version: MavlinkVersion,
12150        __input: &[u8],
12151    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12152        let avail_len = __input.len();
12153        let mut payload_buf = [0; Self::ENCODED_LEN];
12154        let mut buf = if avail_len < Self::ENCODED_LEN {
12155            payload_buf[0..avail_len].copy_from_slice(__input);
12156            Bytes::new(&payload_buf)
12157        } else {
12158            Bytes::new(__input)
12159        };
12160        let mut __struct = Self::default();
12161        __struct.target_system = buf.get_u8();
12162        __struct.target_component = buf.get_u8();
12163        Ok(__struct)
12164    }
12165    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12166        let mut __tmp = BytesMut::new(bytes);
12167        #[allow(clippy::absurd_extreme_comparisons)]
12168        #[allow(unused_comparisons)]
12169        if __tmp.remaining() < Self::ENCODED_LEN {
12170            panic!(
12171                "buffer is too small (need {} bytes, but got {})",
12172                Self::ENCODED_LEN,
12173                __tmp.remaining(),
12174            )
12175        }
12176        __tmp.put_u8(self.target_system);
12177        __tmp.put_u8(self.target_component);
12178        if matches!(version, MavlinkVersion::V2) {
12179            let len = __tmp.len();
12180            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12181        } else {
12182            __tmp.len()
12183        }
12184    }
12185}
12186#[doc = "id: 264"]
12187#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
12188#[derive(Debug, Clone, PartialEq)]
12189#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12190#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12191pub struct FLIGHT_INFORMATION_DATA {
12192    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
12193    pub arming_time_utc: u64,
12194    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
12195    pub takeoff_time_utc: u64,
12196    #[doc = "Flight number. Note, field is misnamed UUID."]
12197    pub flight_uuid: u64,
12198    #[doc = "Timestamp (time since system boot)."]
12199    pub time_boot_ms: u32,
12200    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
12201    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12202    pub landing_time: u32,
12203}
12204impl FLIGHT_INFORMATION_DATA {
12205    pub const ENCODED_LEN: usize = 32usize;
12206    pub const DEFAULT: Self = Self {
12207        arming_time_utc: 0_u64,
12208        takeoff_time_utc: 0_u64,
12209        flight_uuid: 0_u64,
12210        time_boot_ms: 0_u32,
12211        landing_time: 0_u32,
12212    };
12213    #[cfg(feature = "arbitrary")]
12214    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12215        use arbitrary::{Arbitrary, Unstructured};
12216        let mut buf = [0u8; 1024];
12217        rng.fill_bytes(&mut buf);
12218        let mut unstructured = Unstructured::new(&buf);
12219        Self::arbitrary(&mut unstructured).unwrap_or_default()
12220    }
12221}
12222impl Default for FLIGHT_INFORMATION_DATA {
12223    fn default() -> Self {
12224        Self::DEFAULT.clone()
12225    }
12226}
12227impl MessageData for FLIGHT_INFORMATION_DATA {
12228    type Message = MavMessage;
12229    const ID: u32 = 264u32;
12230    const NAME: &'static str = "FLIGHT_INFORMATION";
12231    const EXTRA_CRC: u8 = 49u8;
12232    const ENCODED_LEN: usize = 32usize;
12233    fn deser(
12234        _version: MavlinkVersion,
12235        __input: &[u8],
12236    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12237        let avail_len = __input.len();
12238        let mut payload_buf = [0; Self::ENCODED_LEN];
12239        let mut buf = if avail_len < Self::ENCODED_LEN {
12240            payload_buf[0..avail_len].copy_from_slice(__input);
12241            Bytes::new(&payload_buf)
12242        } else {
12243            Bytes::new(__input)
12244        };
12245        let mut __struct = Self::default();
12246        __struct.arming_time_utc = buf.get_u64_le();
12247        __struct.takeoff_time_utc = buf.get_u64_le();
12248        __struct.flight_uuid = buf.get_u64_le();
12249        __struct.time_boot_ms = buf.get_u32_le();
12250        __struct.landing_time = buf.get_u32_le();
12251        Ok(__struct)
12252    }
12253    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12254        let mut __tmp = BytesMut::new(bytes);
12255        #[allow(clippy::absurd_extreme_comparisons)]
12256        #[allow(unused_comparisons)]
12257        if __tmp.remaining() < Self::ENCODED_LEN {
12258            panic!(
12259                "buffer is too small (need {} bytes, but got {})",
12260                Self::ENCODED_LEN,
12261                __tmp.remaining(),
12262            )
12263        }
12264        __tmp.put_u64_le(self.arming_time_utc);
12265        __tmp.put_u64_le(self.takeoff_time_utc);
12266        __tmp.put_u64_le(self.flight_uuid);
12267        __tmp.put_u32_le(self.time_boot_ms);
12268        __tmp.put_u32_le(self.landing_time);
12269        if matches!(version, MavlinkVersion::V2) {
12270            let len = __tmp.len();
12271            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12272        } else {
12273            __tmp.len()
12274        }
12275    }
12276}
12277#[doc = "id: 144"]
12278#[doc = "Current motion information from a designated system."]
12279#[derive(Debug, Clone, PartialEq)]
12280#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12281#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12282pub struct FOLLOW_TARGET_DATA {
12283    #[doc = "Timestamp (time since system boot)."]
12284    pub timestamp: u64,
12285    #[doc = "button states or switches of a tracker device"]
12286    pub custom_state: u64,
12287    #[doc = "Latitude (WGS84)"]
12288    pub lat: i32,
12289    #[doc = "Longitude (WGS84)"]
12290    pub lon: i32,
12291    #[doc = "Altitude (MSL)"]
12292    pub alt: f32,
12293    #[doc = "target velocity (0,0,0) for unknown"]
12294    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12295    pub vel: [f32; 3],
12296    #[doc = "linear target acceleration (0,0,0) for unknown"]
12297    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12298    pub acc: [f32; 3],
12299    #[doc = "(0 0 0 0 for unknown)"]
12300    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12301    pub attitude_q: [f32; 4],
12302    #[doc = "(0 0 0 for unknown)"]
12303    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12304    pub rates: [f32; 3],
12305    #[doc = "eph epv"]
12306    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12307    pub position_cov: [f32; 3],
12308    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12309    pub est_capabilities: u8,
12310}
12311impl FOLLOW_TARGET_DATA {
12312    pub const ENCODED_LEN: usize = 93usize;
12313    pub const DEFAULT: Self = Self {
12314        timestamp: 0_u64,
12315        custom_state: 0_u64,
12316        lat: 0_i32,
12317        lon: 0_i32,
12318        alt: 0.0_f32,
12319        vel: [0.0_f32; 3usize],
12320        acc: [0.0_f32; 3usize],
12321        attitude_q: [0.0_f32; 4usize],
12322        rates: [0.0_f32; 3usize],
12323        position_cov: [0.0_f32; 3usize],
12324        est_capabilities: 0_u8,
12325    };
12326    #[cfg(feature = "arbitrary")]
12327    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12328        use arbitrary::{Arbitrary, Unstructured};
12329        let mut buf = [0u8; 1024];
12330        rng.fill_bytes(&mut buf);
12331        let mut unstructured = Unstructured::new(&buf);
12332        Self::arbitrary(&mut unstructured).unwrap_or_default()
12333    }
12334}
12335impl Default for FOLLOW_TARGET_DATA {
12336    fn default() -> Self {
12337        Self::DEFAULT.clone()
12338    }
12339}
12340impl MessageData for FOLLOW_TARGET_DATA {
12341    type Message = MavMessage;
12342    const ID: u32 = 144u32;
12343    const NAME: &'static str = "FOLLOW_TARGET";
12344    const EXTRA_CRC: u8 = 127u8;
12345    const ENCODED_LEN: usize = 93usize;
12346    fn deser(
12347        _version: MavlinkVersion,
12348        __input: &[u8],
12349    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12350        let avail_len = __input.len();
12351        let mut payload_buf = [0; Self::ENCODED_LEN];
12352        let mut buf = if avail_len < Self::ENCODED_LEN {
12353            payload_buf[0..avail_len].copy_from_slice(__input);
12354            Bytes::new(&payload_buf)
12355        } else {
12356            Bytes::new(__input)
12357        };
12358        let mut __struct = Self::default();
12359        __struct.timestamp = buf.get_u64_le();
12360        __struct.custom_state = buf.get_u64_le();
12361        __struct.lat = buf.get_i32_le();
12362        __struct.lon = buf.get_i32_le();
12363        __struct.alt = buf.get_f32_le();
12364        for v in &mut __struct.vel {
12365            let val = buf.get_f32_le();
12366            *v = val;
12367        }
12368        for v in &mut __struct.acc {
12369            let val = buf.get_f32_le();
12370            *v = val;
12371        }
12372        for v in &mut __struct.attitude_q {
12373            let val = buf.get_f32_le();
12374            *v = val;
12375        }
12376        for v in &mut __struct.rates {
12377            let val = buf.get_f32_le();
12378            *v = val;
12379        }
12380        for v in &mut __struct.position_cov {
12381            let val = buf.get_f32_le();
12382            *v = val;
12383        }
12384        __struct.est_capabilities = buf.get_u8();
12385        Ok(__struct)
12386    }
12387    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12388        let mut __tmp = BytesMut::new(bytes);
12389        #[allow(clippy::absurd_extreme_comparisons)]
12390        #[allow(unused_comparisons)]
12391        if __tmp.remaining() < Self::ENCODED_LEN {
12392            panic!(
12393                "buffer is too small (need {} bytes, but got {})",
12394                Self::ENCODED_LEN,
12395                __tmp.remaining(),
12396            )
12397        }
12398        __tmp.put_u64_le(self.timestamp);
12399        __tmp.put_u64_le(self.custom_state);
12400        __tmp.put_i32_le(self.lat);
12401        __tmp.put_i32_le(self.lon);
12402        __tmp.put_f32_le(self.alt);
12403        for val in &self.vel {
12404            __tmp.put_f32_le(*val);
12405        }
12406        for val in &self.acc {
12407            __tmp.put_f32_le(*val);
12408        }
12409        for val in &self.attitude_q {
12410            __tmp.put_f32_le(*val);
12411        }
12412        for val in &self.rates {
12413            __tmp.put_f32_le(*val);
12414        }
12415        for val in &self.position_cov {
12416            __tmp.put_f32_le(*val);
12417        }
12418        __tmp.put_u8(self.est_capabilities);
12419        if matches!(version, MavlinkVersion::V2) {
12420            let len = __tmp.len();
12421            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12422        } else {
12423            __tmp.len()
12424        }
12425    }
12426}
12427#[doc = "id: 371"]
12428#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12429#[derive(Debug, Clone, PartialEq)]
12430#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12431#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12432pub struct FUEL_STATUS_DATA {
12433    #[doc = "Capacity when full. Must be provided."]
12434    pub maximum_fuel: f32,
12435    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12436    pub consumed_fuel: f32,
12437    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12438    pub remaining_fuel: f32,
12439    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12440    pub flow_rate: f32,
12441    #[doc = "Fuel temperature. NaN: field not provided."]
12442    pub temperature: f32,
12443    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12444    pub fuel_type: MavFuelType,
12445    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12446    pub id: u8,
12447    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12448    pub percent_remaining: u8,
12449}
12450impl FUEL_STATUS_DATA {
12451    pub const ENCODED_LEN: usize = 26usize;
12452    pub const DEFAULT: Self = Self {
12453        maximum_fuel: 0.0_f32,
12454        consumed_fuel: 0.0_f32,
12455        remaining_fuel: 0.0_f32,
12456        flow_rate: 0.0_f32,
12457        temperature: 0.0_f32,
12458        fuel_type: MavFuelType::DEFAULT,
12459        id: 0_u8,
12460        percent_remaining: 0_u8,
12461    };
12462    #[cfg(feature = "arbitrary")]
12463    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12464        use arbitrary::{Arbitrary, Unstructured};
12465        let mut buf = [0u8; 1024];
12466        rng.fill_bytes(&mut buf);
12467        let mut unstructured = Unstructured::new(&buf);
12468        Self::arbitrary(&mut unstructured).unwrap_or_default()
12469    }
12470}
12471impl Default for FUEL_STATUS_DATA {
12472    fn default() -> Self {
12473        Self::DEFAULT.clone()
12474    }
12475}
12476impl MessageData for FUEL_STATUS_DATA {
12477    type Message = MavMessage;
12478    const ID: u32 = 371u32;
12479    const NAME: &'static str = "FUEL_STATUS";
12480    const EXTRA_CRC: u8 = 10u8;
12481    const ENCODED_LEN: usize = 26usize;
12482    fn deser(
12483        _version: MavlinkVersion,
12484        __input: &[u8],
12485    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12486        let avail_len = __input.len();
12487        let mut payload_buf = [0; Self::ENCODED_LEN];
12488        let mut buf = if avail_len < Self::ENCODED_LEN {
12489            payload_buf[0..avail_len].copy_from_slice(__input);
12490            Bytes::new(&payload_buf)
12491        } else {
12492            Bytes::new(__input)
12493        };
12494        let mut __struct = Self::default();
12495        __struct.maximum_fuel = buf.get_f32_le();
12496        __struct.consumed_fuel = buf.get_f32_le();
12497        __struct.remaining_fuel = buf.get_f32_le();
12498        __struct.flow_rate = buf.get_f32_le();
12499        __struct.temperature = buf.get_f32_le();
12500        let tmp = buf.get_u32_le();
12501        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12502            ::mavlink_core::error::ParserError::InvalidEnum {
12503                enum_type: "MavFuelType",
12504                value: tmp as u32,
12505            },
12506        )?;
12507        __struct.id = buf.get_u8();
12508        __struct.percent_remaining = buf.get_u8();
12509        Ok(__struct)
12510    }
12511    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12512        let mut __tmp = BytesMut::new(bytes);
12513        #[allow(clippy::absurd_extreme_comparisons)]
12514        #[allow(unused_comparisons)]
12515        if __tmp.remaining() < Self::ENCODED_LEN {
12516            panic!(
12517                "buffer is too small (need {} bytes, but got {})",
12518                Self::ENCODED_LEN,
12519                __tmp.remaining(),
12520            )
12521        }
12522        __tmp.put_f32_le(self.maximum_fuel);
12523        __tmp.put_f32_le(self.consumed_fuel);
12524        __tmp.put_f32_le(self.remaining_fuel);
12525        __tmp.put_f32_le(self.flow_rate);
12526        __tmp.put_f32_le(self.temperature);
12527        __tmp.put_u32_le(self.fuel_type as u32);
12528        __tmp.put_u8(self.id);
12529        __tmp.put_u8(self.percent_remaining);
12530        if matches!(version, MavlinkVersion::V2) {
12531            let len = __tmp.len();
12532            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12533        } else {
12534            __tmp.len()
12535        }
12536    }
12537}
12538#[doc = "id: 373"]
12539#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12540#[derive(Debug, Clone, PartialEq)]
12541#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12542#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12543pub struct GENERATOR_STATUS_DATA {
12544    #[doc = "Status flags."]
12545    pub status: MavGeneratorStatusFlag,
12546    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12547    pub battery_current: f32,
12548    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12549    pub load_current: f32,
12550    #[doc = "The power being generated. NaN: field not provided"]
12551    pub power_generated: f32,
12552    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12553    pub bus_voltage: f32,
12554    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12555    pub bat_current_setpoint: f32,
12556    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12557    pub runtime: u32,
12558    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12559    pub time_until_maintenance: i32,
12560    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12561    pub generator_speed: u16,
12562    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12563    pub rectifier_temperature: i16,
12564    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12565    pub generator_temperature: i16,
12566}
12567impl GENERATOR_STATUS_DATA {
12568    pub const ENCODED_LEN: usize = 42usize;
12569    pub const DEFAULT: Self = Self {
12570        status: MavGeneratorStatusFlag::DEFAULT,
12571        battery_current: 0.0_f32,
12572        load_current: 0.0_f32,
12573        power_generated: 0.0_f32,
12574        bus_voltage: 0.0_f32,
12575        bat_current_setpoint: 0.0_f32,
12576        runtime: 0_u32,
12577        time_until_maintenance: 0_i32,
12578        generator_speed: 0_u16,
12579        rectifier_temperature: 0_i16,
12580        generator_temperature: 0_i16,
12581    };
12582    #[cfg(feature = "arbitrary")]
12583    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12584        use arbitrary::{Arbitrary, Unstructured};
12585        let mut buf = [0u8; 1024];
12586        rng.fill_bytes(&mut buf);
12587        let mut unstructured = Unstructured::new(&buf);
12588        Self::arbitrary(&mut unstructured).unwrap_or_default()
12589    }
12590}
12591impl Default for GENERATOR_STATUS_DATA {
12592    fn default() -> Self {
12593        Self::DEFAULT.clone()
12594    }
12595}
12596impl MessageData for GENERATOR_STATUS_DATA {
12597    type Message = MavMessage;
12598    const ID: u32 = 373u32;
12599    const NAME: &'static str = "GENERATOR_STATUS";
12600    const EXTRA_CRC: u8 = 117u8;
12601    const ENCODED_LEN: usize = 42usize;
12602    fn deser(
12603        _version: MavlinkVersion,
12604        __input: &[u8],
12605    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12606        let avail_len = __input.len();
12607        let mut payload_buf = [0; Self::ENCODED_LEN];
12608        let mut buf = if avail_len < Self::ENCODED_LEN {
12609            payload_buf[0..avail_len].copy_from_slice(__input);
12610            Bytes::new(&payload_buf)
12611        } else {
12612            Bytes::new(__input)
12613        };
12614        let mut __struct = Self::default();
12615        let tmp = buf.get_u64_le();
12616        __struct.status = MavGeneratorStatusFlag::from_bits(
12617            tmp & MavGeneratorStatusFlag::all().bits(),
12618        )
12619        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12620            flag_type: "MavGeneratorStatusFlag",
12621            value: tmp as u32,
12622        })?;
12623        __struct.battery_current = buf.get_f32_le();
12624        __struct.load_current = buf.get_f32_le();
12625        __struct.power_generated = buf.get_f32_le();
12626        __struct.bus_voltage = buf.get_f32_le();
12627        __struct.bat_current_setpoint = buf.get_f32_le();
12628        __struct.runtime = buf.get_u32_le();
12629        __struct.time_until_maintenance = buf.get_i32_le();
12630        __struct.generator_speed = buf.get_u16_le();
12631        __struct.rectifier_temperature = buf.get_i16_le();
12632        __struct.generator_temperature = buf.get_i16_le();
12633        Ok(__struct)
12634    }
12635    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12636        let mut __tmp = BytesMut::new(bytes);
12637        #[allow(clippy::absurd_extreme_comparisons)]
12638        #[allow(unused_comparisons)]
12639        if __tmp.remaining() < Self::ENCODED_LEN {
12640            panic!(
12641                "buffer is too small (need {} bytes, but got {})",
12642                Self::ENCODED_LEN,
12643                __tmp.remaining(),
12644            )
12645        }
12646        __tmp.put_u64_le(self.status.bits());
12647        __tmp.put_f32_le(self.battery_current);
12648        __tmp.put_f32_le(self.load_current);
12649        __tmp.put_f32_le(self.power_generated);
12650        __tmp.put_f32_le(self.bus_voltage);
12651        __tmp.put_f32_le(self.bat_current_setpoint);
12652        __tmp.put_u32_le(self.runtime);
12653        __tmp.put_i32_le(self.time_until_maintenance);
12654        __tmp.put_u16_le(self.generator_speed);
12655        __tmp.put_i16_le(self.rectifier_temperature);
12656        __tmp.put_i16_le(self.generator_temperature);
12657        if matches!(version, MavlinkVersion::V2) {
12658            let len = __tmp.len();
12659            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12660        } else {
12661            __tmp.len()
12662        }
12663    }
12664}
12665#[doc = "id: 285"]
12666#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12667#[derive(Debug, Clone, PartialEq)]
12668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12670pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12671    #[doc = "Timestamp (time since system boot)."]
12672    pub time_boot_ms: u32,
12673    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12674    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12675    pub q: [f32; 4],
12676    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12677    pub angular_velocity_x: f32,
12678    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12679    pub angular_velocity_y: f32,
12680    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12681    pub angular_velocity_z: f32,
12682    #[doc = "Failure flags (0 for no failure)"]
12683    pub failure_flags: GimbalDeviceErrorFlags,
12684    #[doc = "Current gimbal flags set."]
12685    pub flags: GimbalDeviceFlags,
12686    #[doc = "System ID"]
12687    pub target_system: u8,
12688    #[doc = "Component ID"]
12689    pub target_component: u8,
12690    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12691    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12692    pub delta_yaw: f32,
12693    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12694    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12695    pub delta_yaw_velocity: f32,
12696    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12697    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12698    pub gimbal_device_id: u8,
12699}
12700impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12701    pub const ENCODED_LEN: usize = 49usize;
12702    pub const DEFAULT: Self = Self {
12703        time_boot_ms: 0_u32,
12704        q: [0.0_f32; 4usize],
12705        angular_velocity_x: 0.0_f32,
12706        angular_velocity_y: 0.0_f32,
12707        angular_velocity_z: 0.0_f32,
12708        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12709        flags: GimbalDeviceFlags::DEFAULT,
12710        target_system: 0_u8,
12711        target_component: 0_u8,
12712        delta_yaw: 0.0_f32,
12713        delta_yaw_velocity: 0.0_f32,
12714        gimbal_device_id: 0_u8,
12715    };
12716    #[cfg(feature = "arbitrary")]
12717    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12718        use arbitrary::{Arbitrary, Unstructured};
12719        let mut buf = [0u8; 1024];
12720        rng.fill_bytes(&mut buf);
12721        let mut unstructured = Unstructured::new(&buf);
12722        Self::arbitrary(&mut unstructured).unwrap_or_default()
12723    }
12724}
12725impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12726    fn default() -> Self {
12727        Self::DEFAULT.clone()
12728    }
12729}
12730impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12731    type Message = MavMessage;
12732    const ID: u32 = 285u32;
12733    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12734    const EXTRA_CRC: u8 = 137u8;
12735    const ENCODED_LEN: usize = 49usize;
12736    fn deser(
12737        _version: MavlinkVersion,
12738        __input: &[u8],
12739    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12740        let avail_len = __input.len();
12741        let mut payload_buf = [0; Self::ENCODED_LEN];
12742        let mut buf = if avail_len < Self::ENCODED_LEN {
12743            payload_buf[0..avail_len].copy_from_slice(__input);
12744            Bytes::new(&payload_buf)
12745        } else {
12746            Bytes::new(__input)
12747        };
12748        let mut __struct = Self::default();
12749        __struct.time_boot_ms = buf.get_u32_le();
12750        for v in &mut __struct.q {
12751            let val = buf.get_f32_le();
12752            *v = val;
12753        }
12754        __struct.angular_velocity_x = buf.get_f32_le();
12755        __struct.angular_velocity_y = buf.get_f32_le();
12756        __struct.angular_velocity_z = buf.get_f32_le();
12757        let tmp = buf.get_u32_le();
12758        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
12759            tmp & GimbalDeviceErrorFlags::all().bits(),
12760        )
12761        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12762            flag_type: "GimbalDeviceErrorFlags",
12763            value: tmp as u32,
12764        })?;
12765        let tmp = buf.get_u16_le();
12766        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12767            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12768                flag_type: "GimbalDeviceFlags",
12769                value: tmp as u32,
12770            })?;
12771        __struct.target_system = buf.get_u8();
12772        __struct.target_component = buf.get_u8();
12773        __struct.delta_yaw = buf.get_f32_le();
12774        __struct.delta_yaw_velocity = buf.get_f32_le();
12775        __struct.gimbal_device_id = buf.get_u8();
12776        Ok(__struct)
12777    }
12778    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12779        let mut __tmp = BytesMut::new(bytes);
12780        #[allow(clippy::absurd_extreme_comparisons)]
12781        #[allow(unused_comparisons)]
12782        if __tmp.remaining() < Self::ENCODED_LEN {
12783            panic!(
12784                "buffer is too small (need {} bytes, but got {})",
12785                Self::ENCODED_LEN,
12786                __tmp.remaining(),
12787            )
12788        }
12789        __tmp.put_u32_le(self.time_boot_ms);
12790        for val in &self.q {
12791            __tmp.put_f32_le(*val);
12792        }
12793        __tmp.put_f32_le(self.angular_velocity_x);
12794        __tmp.put_f32_le(self.angular_velocity_y);
12795        __tmp.put_f32_le(self.angular_velocity_z);
12796        __tmp.put_u32_le(self.failure_flags.bits());
12797        __tmp.put_u16_le(self.flags.bits());
12798        __tmp.put_u8(self.target_system);
12799        __tmp.put_u8(self.target_component);
12800        __tmp.put_f32_le(self.delta_yaw);
12801        __tmp.put_f32_le(self.delta_yaw_velocity);
12802        __tmp.put_u8(self.gimbal_device_id);
12803        if matches!(version, MavlinkVersion::V2) {
12804            let len = __tmp.len();
12805            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12806        } else {
12807            __tmp.len()
12808        }
12809    }
12810}
12811#[doc = "id: 283"]
12812#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12813#[derive(Debug, Clone, PartialEq)]
12814#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12816pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12817    #[doc = "UID of gimbal hardware (0 if unknown)."]
12818    pub uid: u64,
12819    #[doc = "Timestamp (time since system boot)."]
12820    pub time_boot_ms: u32,
12821    #[doc = "0xff)."]
12822    pub firmware_version: u32,
12823    #[doc = "0xff)."]
12824    pub hardware_version: u32,
12825    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12826    pub roll_min: f32,
12827    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12828    pub roll_max: f32,
12829    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12830    pub pitch_min: f32,
12831    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12832    pub pitch_max: f32,
12833    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12834    pub yaw_min: f32,
12835    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12836    pub yaw_max: f32,
12837    #[doc = "Bitmap of gimbal capability flags."]
12838    pub cap_flags: GimbalDeviceCapFlags,
12839    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12840    pub custom_cap_flags: u16,
12841    #[doc = "Name of the gimbal vendor."]
12842    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12843    pub vendor_name: [u8; 32],
12844    #[doc = "Name of the gimbal model."]
12845    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12846    pub model_name: [u8; 32],
12847    #[doc = "Custom name of the gimbal given to it by the user."]
12848    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12849    pub custom_name: [u8; 32],
12850    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12851    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12852    pub gimbal_device_id: u8,
12853}
12854impl GIMBAL_DEVICE_INFORMATION_DATA {
12855    pub const ENCODED_LEN: usize = 145usize;
12856    pub const DEFAULT: Self = Self {
12857        uid: 0_u64,
12858        time_boot_ms: 0_u32,
12859        firmware_version: 0_u32,
12860        hardware_version: 0_u32,
12861        roll_min: 0.0_f32,
12862        roll_max: 0.0_f32,
12863        pitch_min: 0.0_f32,
12864        pitch_max: 0.0_f32,
12865        yaw_min: 0.0_f32,
12866        yaw_max: 0.0_f32,
12867        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12868        custom_cap_flags: 0_u16,
12869        vendor_name: [0_u8; 32usize],
12870        model_name: [0_u8; 32usize],
12871        custom_name: [0_u8; 32usize],
12872        gimbal_device_id: 0_u8,
12873    };
12874    #[cfg(feature = "arbitrary")]
12875    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12876        use arbitrary::{Arbitrary, Unstructured};
12877        let mut buf = [0u8; 1024];
12878        rng.fill_bytes(&mut buf);
12879        let mut unstructured = Unstructured::new(&buf);
12880        Self::arbitrary(&mut unstructured).unwrap_or_default()
12881    }
12882}
12883impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12884    fn default() -> Self {
12885        Self::DEFAULT.clone()
12886    }
12887}
12888impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12889    type Message = MavMessage;
12890    const ID: u32 = 283u32;
12891    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12892    const EXTRA_CRC: u8 = 74u8;
12893    const ENCODED_LEN: usize = 145usize;
12894    fn deser(
12895        _version: MavlinkVersion,
12896        __input: &[u8],
12897    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12898        let avail_len = __input.len();
12899        let mut payload_buf = [0; Self::ENCODED_LEN];
12900        let mut buf = if avail_len < Self::ENCODED_LEN {
12901            payload_buf[0..avail_len].copy_from_slice(__input);
12902            Bytes::new(&payload_buf)
12903        } else {
12904            Bytes::new(__input)
12905        };
12906        let mut __struct = Self::default();
12907        __struct.uid = buf.get_u64_le();
12908        __struct.time_boot_ms = buf.get_u32_le();
12909        __struct.firmware_version = buf.get_u32_le();
12910        __struct.hardware_version = buf.get_u32_le();
12911        __struct.roll_min = buf.get_f32_le();
12912        __struct.roll_max = buf.get_f32_le();
12913        __struct.pitch_min = buf.get_f32_le();
12914        __struct.pitch_max = buf.get_f32_le();
12915        __struct.yaw_min = buf.get_f32_le();
12916        __struct.yaw_max = buf.get_f32_le();
12917        let tmp = buf.get_u16_le();
12918        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12919            tmp & GimbalDeviceCapFlags::all().bits(),
12920        )
12921        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12922            flag_type: "GimbalDeviceCapFlags",
12923            value: tmp as u32,
12924        })?;
12925        __struct.custom_cap_flags = buf.get_u16_le();
12926        for v in &mut __struct.vendor_name {
12927            let val = buf.get_u8();
12928            *v = val;
12929        }
12930        for v in &mut __struct.model_name {
12931            let val = buf.get_u8();
12932            *v = val;
12933        }
12934        for v in &mut __struct.custom_name {
12935            let val = buf.get_u8();
12936            *v = val;
12937        }
12938        __struct.gimbal_device_id = buf.get_u8();
12939        Ok(__struct)
12940    }
12941    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12942        let mut __tmp = BytesMut::new(bytes);
12943        #[allow(clippy::absurd_extreme_comparisons)]
12944        #[allow(unused_comparisons)]
12945        if __tmp.remaining() < Self::ENCODED_LEN {
12946            panic!(
12947                "buffer is too small (need {} bytes, but got {})",
12948                Self::ENCODED_LEN,
12949                __tmp.remaining(),
12950            )
12951        }
12952        __tmp.put_u64_le(self.uid);
12953        __tmp.put_u32_le(self.time_boot_ms);
12954        __tmp.put_u32_le(self.firmware_version);
12955        __tmp.put_u32_le(self.hardware_version);
12956        __tmp.put_f32_le(self.roll_min);
12957        __tmp.put_f32_le(self.roll_max);
12958        __tmp.put_f32_le(self.pitch_min);
12959        __tmp.put_f32_le(self.pitch_max);
12960        __tmp.put_f32_le(self.yaw_min);
12961        __tmp.put_f32_le(self.yaw_max);
12962        __tmp.put_u16_le(self.cap_flags.bits());
12963        __tmp.put_u16_le(self.custom_cap_flags);
12964        for val in &self.vendor_name {
12965            __tmp.put_u8(*val);
12966        }
12967        for val in &self.model_name {
12968            __tmp.put_u8(*val);
12969        }
12970        for val in &self.custom_name {
12971            __tmp.put_u8(*val);
12972        }
12973        __tmp.put_u8(self.gimbal_device_id);
12974        if matches!(version, MavlinkVersion::V2) {
12975            let len = __tmp.len();
12976            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12977        } else {
12978            __tmp.len()
12979        }
12980    }
12981}
12982#[doc = "id: 284"]
12983#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12984#[derive(Debug, Clone, PartialEq)]
12985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12986#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12987pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12988    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12989    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12990    pub q: [f32; 4],
12991    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12992    pub angular_velocity_x: f32,
12993    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12994    pub angular_velocity_y: f32,
12995    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12996    pub angular_velocity_z: f32,
12997    #[doc = "Low level gimbal flags."]
12998    pub flags: GimbalDeviceFlags,
12999    #[doc = "System ID"]
13000    pub target_system: u8,
13001    #[doc = "Component ID"]
13002    pub target_component: u8,
13003}
13004impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13005    pub const ENCODED_LEN: usize = 32usize;
13006    pub const DEFAULT: Self = Self {
13007        q: [0.0_f32; 4usize],
13008        angular_velocity_x: 0.0_f32,
13009        angular_velocity_y: 0.0_f32,
13010        angular_velocity_z: 0.0_f32,
13011        flags: GimbalDeviceFlags::DEFAULT,
13012        target_system: 0_u8,
13013        target_component: 0_u8,
13014    };
13015    #[cfg(feature = "arbitrary")]
13016    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13017        use arbitrary::{Arbitrary, Unstructured};
13018        let mut buf = [0u8; 1024];
13019        rng.fill_bytes(&mut buf);
13020        let mut unstructured = Unstructured::new(&buf);
13021        Self::arbitrary(&mut unstructured).unwrap_or_default()
13022    }
13023}
13024impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13025    fn default() -> Self {
13026        Self::DEFAULT.clone()
13027    }
13028}
13029impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13030    type Message = MavMessage;
13031    const ID: u32 = 284u32;
13032    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
13033    const EXTRA_CRC: u8 = 99u8;
13034    const ENCODED_LEN: usize = 32usize;
13035    fn deser(
13036        _version: MavlinkVersion,
13037        __input: &[u8],
13038    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13039        let avail_len = __input.len();
13040        let mut payload_buf = [0; Self::ENCODED_LEN];
13041        let mut buf = if avail_len < Self::ENCODED_LEN {
13042            payload_buf[0..avail_len].copy_from_slice(__input);
13043            Bytes::new(&payload_buf)
13044        } else {
13045            Bytes::new(__input)
13046        };
13047        let mut __struct = Self::default();
13048        for v in &mut __struct.q {
13049            let val = buf.get_f32_le();
13050            *v = val;
13051        }
13052        __struct.angular_velocity_x = buf.get_f32_le();
13053        __struct.angular_velocity_y = buf.get_f32_le();
13054        __struct.angular_velocity_z = buf.get_f32_le();
13055        let tmp = buf.get_u16_le();
13056        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
13057            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13058                flag_type: "GimbalDeviceFlags",
13059                value: tmp as u32,
13060            })?;
13061        __struct.target_system = buf.get_u8();
13062        __struct.target_component = buf.get_u8();
13063        Ok(__struct)
13064    }
13065    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13066        let mut __tmp = BytesMut::new(bytes);
13067        #[allow(clippy::absurd_extreme_comparisons)]
13068        #[allow(unused_comparisons)]
13069        if __tmp.remaining() < Self::ENCODED_LEN {
13070            panic!(
13071                "buffer is too small (need {} bytes, but got {})",
13072                Self::ENCODED_LEN,
13073                __tmp.remaining(),
13074            )
13075        }
13076        for val in &self.q {
13077            __tmp.put_f32_le(*val);
13078        }
13079        __tmp.put_f32_le(self.angular_velocity_x);
13080        __tmp.put_f32_le(self.angular_velocity_y);
13081        __tmp.put_f32_le(self.angular_velocity_z);
13082        __tmp.put_u16_le(self.flags.bits());
13083        __tmp.put_u8(self.target_system);
13084        __tmp.put_u8(self.target_component);
13085        if matches!(version, MavlinkVersion::V2) {
13086            let len = __tmp.len();
13087            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13088        } else {
13089            __tmp.len()
13090        }
13091    }
13092}
13093#[doc = "id: 280"]
13094#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13095#[derive(Debug, Clone, PartialEq)]
13096#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13097#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13098pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13099    #[doc = "Timestamp (time since system boot)."]
13100    pub time_boot_ms: u32,
13101    #[doc = "Bitmap of gimbal capability flags."]
13102    pub cap_flags: GimbalManagerCapFlags,
13103    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13104    pub roll_min: f32,
13105    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13106    pub roll_max: f32,
13107    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13108    pub pitch_min: f32,
13109    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13110    pub pitch_max: f32,
13111    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13112    pub yaw_min: f32,
13113    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13114    pub yaw_max: f32,
13115    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13116    pub gimbal_device_id: u8,
13117}
13118impl GIMBAL_MANAGER_INFORMATION_DATA {
13119    pub const ENCODED_LEN: usize = 33usize;
13120    pub const DEFAULT: Self = Self {
13121        time_boot_ms: 0_u32,
13122        cap_flags: GimbalManagerCapFlags::DEFAULT,
13123        roll_min: 0.0_f32,
13124        roll_max: 0.0_f32,
13125        pitch_min: 0.0_f32,
13126        pitch_max: 0.0_f32,
13127        yaw_min: 0.0_f32,
13128        yaw_max: 0.0_f32,
13129        gimbal_device_id: 0_u8,
13130    };
13131    #[cfg(feature = "arbitrary")]
13132    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13133        use arbitrary::{Arbitrary, Unstructured};
13134        let mut buf = [0u8; 1024];
13135        rng.fill_bytes(&mut buf);
13136        let mut unstructured = Unstructured::new(&buf);
13137        Self::arbitrary(&mut unstructured).unwrap_or_default()
13138    }
13139}
13140impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13141    fn default() -> Self {
13142        Self::DEFAULT.clone()
13143    }
13144}
13145impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13146    type Message = MavMessage;
13147    const ID: u32 = 280u32;
13148    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13149    const EXTRA_CRC: u8 = 70u8;
13150    const ENCODED_LEN: usize = 33usize;
13151    fn deser(
13152        _version: MavlinkVersion,
13153        __input: &[u8],
13154    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13155        let avail_len = __input.len();
13156        let mut payload_buf = [0; Self::ENCODED_LEN];
13157        let mut buf = if avail_len < Self::ENCODED_LEN {
13158            payload_buf[0..avail_len].copy_from_slice(__input);
13159            Bytes::new(&payload_buf)
13160        } else {
13161            Bytes::new(__input)
13162        };
13163        let mut __struct = Self::default();
13164        __struct.time_boot_ms = buf.get_u32_le();
13165        let tmp = buf.get_u32_le();
13166        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
13167            tmp & GimbalManagerCapFlags::all().bits(),
13168        )
13169        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13170            flag_type: "GimbalManagerCapFlags",
13171            value: tmp as u32,
13172        })?;
13173        __struct.roll_min = buf.get_f32_le();
13174        __struct.roll_max = buf.get_f32_le();
13175        __struct.pitch_min = buf.get_f32_le();
13176        __struct.pitch_max = buf.get_f32_le();
13177        __struct.yaw_min = buf.get_f32_le();
13178        __struct.yaw_max = buf.get_f32_le();
13179        __struct.gimbal_device_id = buf.get_u8();
13180        Ok(__struct)
13181    }
13182    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13183        let mut __tmp = BytesMut::new(bytes);
13184        #[allow(clippy::absurd_extreme_comparisons)]
13185        #[allow(unused_comparisons)]
13186        if __tmp.remaining() < Self::ENCODED_LEN {
13187            panic!(
13188                "buffer is too small (need {} bytes, but got {})",
13189                Self::ENCODED_LEN,
13190                __tmp.remaining(),
13191            )
13192        }
13193        __tmp.put_u32_le(self.time_boot_ms);
13194        __tmp.put_u32_le(self.cap_flags.bits());
13195        __tmp.put_f32_le(self.roll_min);
13196        __tmp.put_f32_le(self.roll_max);
13197        __tmp.put_f32_le(self.pitch_min);
13198        __tmp.put_f32_le(self.pitch_max);
13199        __tmp.put_f32_le(self.yaw_min);
13200        __tmp.put_f32_le(self.yaw_max);
13201        __tmp.put_u8(self.gimbal_device_id);
13202        if matches!(version, MavlinkVersion::V2) {
13203            let len = __tmp.len();
13204            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13205        } else {
13206            __tmp.len()
13207        }
13208    }
13209}
13210#[doc = "id: 282"]
13211#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13212#[derive(Debug, Clone, PartialEq)]
13213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13214#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13215pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13216    #[doc = "High level gimbal manager flags to use."]
13217    pub flags: GimbalManagerFlags,
13218    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13219    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13220    pub q: [f32; 4],
13221    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13222    pub angular_velocity_x: f32,
13223    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13224    pub angular_velocity_y: f32,
13225    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13226    pub angular_velocity_z: f32,
13227    #[doc = "System ID"]
13228    pub target_system: u8,
13229    #[doc = "Component ID"]
13230    pub target_component: u8,
13231    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13232    pub gimbal_device_id: u8,
13233}
13234impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13235    pub const ENCODED_LEN: usize = 35usize;
13236    pub const DEFAULT: Self = Self {
13237        flags: GimbalManagerFlags::DEFAULT,
13238        q: [0.0_f32; 4usize],
13239        angular_velocity_x: 0.0_f32,
13240        angular_velocity_y: 0.0_f32,
13241        angular_velocity_z: 0.0_f32,
13242        target_system: 0_u8,
13243        target_component: 0_u8,
13244        gimbal_device_id: 0_u8,
13245    };
13246    #[cfg(feature = "arbitrary")]
13247    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13248        use arbitrary::{Arbitrary, Unstructured};
13249        let mut buf = [0u8; 1024];
13250        rng.fill_bytes(&mut buf);
13251        let mut unstructured = Unstructured::new(&buf);
13252        Self::arbitrary(&mut unstructured).unwrap_or_default()
13253    }
13254}
13255impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13256    fn default() -> Self {
13257        Self::DEFAULT.clone()
13258    }
13259}
13260impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13261    type Message = MavMessage;
13262    const ID: u32 = 282u32;
13263    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13264    const EXTRA_CRC: u8 = 123u8;
13265    const ENCODED_LEN: usize = 35usize;
13266    fn deser(
13267        _version: MavlinkVersion,
13268        __input: &[u8],
13269    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13270        let avail_len = __input.len();
13271        let mut payload_buf = [0; Self::ENCODED_LEN];
13272        let mut buf = if avail_len < Self::ENCODED_LEN {
13273            payload_buf[0..avail_len].copy_from_slice(__input);
13274            Bytes::new(&payload_buf)
13275        } else {
13276            Bytes::new(__input)
13277        };
13278        let mut __struct = Self::default();
13279        let tmp = buf.get_u32_le();
13280        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13281            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13282                flag_type: "GimbalManagerFlags",
13283                value: tmp as u32,
13284            })?;
13285        for v in &mut __struct.q {
13286            let val = buf.get_f32_le();
13287            *v = val;
13288        }
13289        __struct.angular_velocity_x = buf.get_f32_le();
13290        __struct.angular_velocity_y = buf.get_f32_le();
13291        __struct.angular_velocity_z = buf.get_f32_le();
13292        __struct.target_system = buf.get_u8();
13293        __struct.target_component = buf.get_u8();
13294        __struct.gimbal_device_id = buf.get_u8();
13295        Ok(__struct)
13296    }
13297    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13298        let mut __tmp = BytesMut::new(bytes);
13299        #[allow(clippy::absurd_extreme_comparisons)]
13300        #[allow(unused_comparisons)]
13301        if __tmp.remaining() < Self::ENCODED_LEN {
13302            panic!(
13303                "buffer is too small (need {} bytes, but got {})",
13304                Self::ENCODED_LEN,
13305                __tmp.remaining(),
13306            )
13307        }
13308        __tmp.put_u32_le(self.flags.bits());
13309        for val in &self.q {
13310            __tmp.put_f32_le(*val);
13311        }
13312        __tmp.put_f32_le(self.angular_velocity_x);
13313        __tmp.put_f32_le(self.angular_velocity_y);
13314        __tmp.put_f32_le(self.angular_velocity_z);
13315        __tmp.put_u8(self.target_system);
13316        __tmp.put_u8(self.target_component);
13317        __tmp.put_u8(self.gimbal_device_id);
13318        if matches!(version, MavlinkVersion::V2) {
13319            let len = __tmp.len();
13320            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13321        } else {
13322            __tmp.len()
13323        }
13324    }
13325}
13326#[doc = "id: 288"]
13327#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13328#[derive(Debug, Clone, PartialEq)]
13329#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13330#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13331pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13332    #[doc = "High level gimbal manager flags."]
13333    pub flags: GimbalManagerFlags,
13334    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13335    pub pitch: f32,
13336    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13337    pub yaw: f32,
13338    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13339    pub pitch_rate: f32,
13340    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13341    pub yaw_rate: f32,
13342    #[doc = "System ID"]
13343    pub target_system: u8,
13344    #[doc = "Component ID"]
13345    pub target_component: u8,
13346    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13347    pub gimbal_device_id: u8,
13348}
13349impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13350    pub const ENCODED_LEN: usize = 23usize;
13351    pub const DEFAULT: Self = Self {
13352        flags: GimbalManagerFlags::DEFAULT,
13353        pitch: 0.0_f32,
13354        yaw: 0.0_f32,
13355        pitch_rate: 0.0_f32,
13356        yaw_rate: 0.0_f32,
13357        target_system: 0_u8,
13358        target_component: 0_u8,
13359        gimbal_device_id: 0_u8,
13360    };
13361    #[cfg(feature = "arbitrary")]
13362    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13363        use arbitrary::{Arbitrary, Unstructured};
13364        let mut buf = [0u8; 1024];
13365        rng.fill_bytes(&mut buf);
13366        let mut unstructured = Unstructured::new(&buf);
13367        Self::arbitrary(&mut unstructured).unwrap_or_default()
13368    }
13369}
13370impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13371    fn default() -> Self {
13372        Self::DEFAULT.clone()
13373    }
13374}
13375impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13376    type Message = MavMessage;
13377    const ID: u32 = 288u32;
13378    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13379    const EXTRA_CRC: u8 = 20u8;
13380    const ENCODED_LEN: usize = 23usize;
13381    fn deser(
13382        _version: MavlinkVersion,
13383        __input: &[u8],
13384    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13385        let avail_len = __input.len();
13386        let mut payload_buf = [0; Self::ENCODED_LEN];
13387        let mut buf = if avail_len < Self::ENCODED_LEN {
13388            payload_buf[0..avail_len].copy_from_slice(__input);
13389            Bytes::new(&payload_buf)
13390        } else {
13391            Bytes::new(__input)
13392        };
13393        let mut __struct = Self::default();
13394        let tmp = buf.get_u32_le();
13395        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13396            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13397                flag_type: "GimbalManagerFlags",
13398                value: tmp as u32,
13399            })?;
13400        __struct.pitch = buf.get_f32_le();
13401        __struct.yaw = buf.get_f32_le();
13402        __struct.pitch_rate = buf.get_f32_le();
13403        __struct.yaw_rate = buf.get_f32_le();
13404        __struct.target_system = buf.get_u8();
13405        __struct.target_component = buf.get_u8();
13406        __struct.gimbal_device_id = buf.get_u8();
13407        Ok(__struct)
13408    }
13409    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13410        let mut __tmp = BytesMut::new(bytes);
13411        #[allow(clippy::absurd_extreme_comparisons)]
13412        #[allow(unused_comparisons)]
13413        if __tmp.remaining() < Self::ENCODED_LEN {
13414            panic!(
13415                "buffer is too small (need {} bytes, but got {})",
13416                Self::ENCODED_LEN,
13417                __tmp.remaining(),
13418            )
13419        }
13420        __tmp.put_u32_le(self.flags.bits());
13421        __tmp.put_f32_le(self.pitch);
13422        __tmp.put_f32_le(self.yaw);
13423        __tmp.put_f32_le(self.pitch_rate);
13424        __tmp.put_f32_le(self.yaw_rate);
13425        __tmp.put_u8(self.target_system);
13426        __tmp.put_u8(self.target_component);
13427        __tmp.put_u8(self.gimbal_device_id);
13428        if matches!(version, MavlinkVersion::V2) {
13429            let len = __tmp.len();
13430            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13431        } else {
13432            __tmp.len()
13433        }
13434    }
13435}
13436#[doc = "id: 287"]
13437#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13438#[derive(Debug, Clone, PartialEq)]
13439#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13440#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13441pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13442    #[doc = "High level gimbal manager flags to use."]
13443    pub flags: GimbalManagerFlags,
13444    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13445    pub pitch: f32,
13446    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13447    pub yaw: f32,
13448    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13449    pub pitch_rate: f32,
13450    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13451    pub yaw_rate: f32,
13452    #[doc = "System ID"]
13453    pub target_system: u8,
13454    #[doc = "Component ID"]
13455    pub target_component: u8,
13456    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13457    pub gimbal_device_id: u8,
13458}
13459impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13460    pub const ENCODED_LEN: usize = 23usize;
13461    pub const DEFAULT: Self = Self {
13462        flags: GimbalManagerFlags::DEFAULT,
13463        pitch: 0.0_f32,
13464        yaw: 0.0_f32,
13465        pitch_rate: 0.0_f32,
13466        yaw_rate: 0.0_f32,
13467        target_system: 0_u8,
13468        target_component: 0_u8,
13469        gimbal_device_id: 0_u8,
13470    };
13471    #[cfg(feature = "arbitrary")]
13472    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13473        use arbitrary::{Arbitrary, Unstructured};
13474        let mut buf = [0u8; 1024];
13475        rng.fill_bytes(&mut buf);
13476        let mut unstructured = Unstructured::new(&buf);
13477        Self::arbitrary(&mut unstructured).unwrap_or_default()
13478    }
13479}
13480impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13481    fn default() -> Self {
13482        Self::DEFAULT.clone()
13483    }
13484}
13485impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13486    type Message = MavMessage;
13487    const ID: u32 = 287u32;
13488    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13489    const EXTRA_CRC: u8 = 1u8;
13490    const ENCODED_LEN: usize = 23usize;
13491    fn deser(
13492        _version: MavlinkVersion,
13493        __input: &[u8],
13494    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13495        let avail_len = __input.len();
13496        let mut payload_buf = [0; Self::ENCODED_LEN];
13497        let mut buf = if avail_len < Self::ENCODED_LEN {
13498            payload_buf[0..avail_len].copy_from_slice(__input);
13499            Bytes::new(&payload_buf)
13500        } else {
13501            Bytes::new(__input)
13502        };
13503        let mut __struct = Self::default();
13504        let tmp = buf.get_u32_le();
13505        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13506            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13507                flag_type: "GimbalManagerFlags",
13508                value: tmp as u32,
13509            })?;
13510        __struct.pitch = buf.get_f32_le();
13511        __struct.yaw = buf.get_f32_le();
13512        __struct.pitch_rate = buf.get_f32_le();
13513        __struct.yaw_rate = buf.get_f32_le();
13514        __struct.target_system = buf.get_u8();
13515        __struct.target_component = buf.get_u8();
13516        __struct.gimbal_device_id = buf.get_u8();
13517        Ok(__struct)
13518    }
13519    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13520        let mut __tmp = BytesMut::new(bytes);
13521        #[allow(clippy::absurd_extreme_comparisons)]
13522        #[allow(unused_comparisons)]
13523        if __tmp.remaining() < Self::ENCODED_LEN {
13524            panic!(
13525                "buffer is too small (need {} bytes, but got {})",
13526                Self::ENCODED_LEN,
13527                __tmp.remaining(),
13528            )
13529        }
13530        __tmp.put_u32_le(self.flags.bits());
13531        __tmp.put_f32_le(self.pitch);
13532        __tmp.put_f32_le(self.yaw);
13533        __tmp.put_f32_le(self.pitch_rate);
13534        __tmp.put_f32_le(self.yaw_rate);
13535        __tmp.put_u8(self.target_system);
13536        __tmp.put_u8(self.target_component);
13537        __tmp.put_u8(self.gimbal_device_id);
13538        if matches!(version, MavlinkVersion::V2) {
13539            let len = __tmp.len();
13540            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13541        } else {
13542            __tmp.len()
13543        }
13544    }
13545}
13546#[doc = "id: 281"]
13547#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13548#[derive(Debug, Clone, PartialEq)]
13549#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13551pub struct GIMBAL_MANAGER_STATUS_DATA {
13552    #[doc = "Timestamp (time since system boot)."]
13553    pub time_boot_ms: u32,
13554    #[doc = "High level gimbal manager flags currently applied."]
13555    pub flags: GimbalManagerFlags,
13556    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13557    pub gimbal_device_id: u8,
13558    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13559    pub primary_control_sysid: u8,
13560    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13561    pub primary_control_compid: u8,
13562    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13563    pub secondary_control_sysid: u8,
13564    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13565    pub secondary_control_compid: u8,
13566}
13567impl GIMBAL_MANAGER_STATUS_DATA {
13568    pub const ENCODED_LEN: usize = 13usize;
13569    pub const DEFAULT: Self = Self {
13570        time_boot_ms: 0_u32,
13571        flags: GimbalManagerFlags::DEFAULT,
13572        gimbal_device_id: 0_u8,
13573        primary_control_sysid: 0_u8,
13574        primary_control_compid: 0_u8,
13575        secondary_control_sysid: 0_u8,
13576        secondary_control_compid: 0_u8,
13577    };
13578    #[cfg(feature = "arbitrary")]
13579    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13580        use arbitrary::{Arbitrary, Unstructured};
13581        let mut buf = [0u8; 1024];
13582        rng.fill_bytes(&mut buf);
13583        let mut unstructured = Unstructured::new(&buf);
13584        Self::arbitrary(&mut unstructured).unwrap_or_default()
13585    }
13586}
13587impl Default for GIMBAL_MANAGER_STATUS_DATA {
13588    fn default() -> Self {
13589        Self::DEFAULT.clone()
13590    }
13591}
13592impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13593    type Message = MavMessage;
13594    const ID: u32 = 281u32;
13595    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13596    const EXTRA_CRC: u8 = 48u8;
13597    const ENCODED_LEN: usize = 13usize;
13598    fn deser(
13599        _version: MavlinkVersion,
13600        __input: &[u8],
13601    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13602        let avail_len = __input.len();
13603        let mut payload_buf = [0; Self::ENCODED_LEN];
13604        let mut buf = if avail_len < Self::ENCODED_LEN {
13605            payload_buf[0..avail_len].copy_from_slice(__input);
13606            Bytes::new(&payload_buf)
13607        } else {
13608            Bytes::new(__input)
13609        };
13610        let mut __struct = Self::default();
13611        __struct.time_boot_ms = buf.get_u32_le();
13612        let tmp = buf.get_u32_le();
13613        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13614            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13615                flag_type: "GimbalManagerFlags",
13616                value: tmp as u32,
13617            })?;
13618        __struct.gimbal_device_id = buf.get_u8();
13619        __struct.primary_control_sysid = buf.get_u8();
13620        __struct.primary_control_compid = buf.get_u8();
13621        __struct.secondary_control_sysid = buf.get_u8();
13622        __struct.secondary_control_compid = buf.get_u8();
13623        Ok(__struct)
13624    }
13625    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13626        let mut __tmp = BytesMut::new(bytes);
13627        #[allow(clippy::absurd_extreme_comparisons)]
13628        #[allow(unused_comparisons)]
13629        if __tmp.remaining() < Self::ENCODED_LEN {
13630            panic!(
13631                "buffer is too small (need {} bytes, but got {})",
13632                Self::ENCODED_LEN,
13633                __tmp.remaining(),
13634            )
13635        }
13636        __tmp.put_u32_le(self.time_boot_ms);
13637        __tmp.put_u32_le(self.flags.bits());
13638        __tmp.put_u8(self.gimbal_device_id);
13639        __tmp.put_u8(self.primary_control_sysid);
13640        __tmp.put_u8(self.primary_control_compid);
13641        __tmp.put_u8(self.secondary_control_sysid);
13642        __tmp.put_u8(self.secondary_control_compid);
13643        if matches!(version, MavlinkVersion::V2) {
13644            let len = __tmp.len();
13645            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13646        } else {
13647            __tmp.len()
13648        }
13649    }
13650}
13651#[doc = "id: 33"]
13652#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13653#[derive(Debug, Clone, PartialEq)]
13654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13656pub struct GLOBAL_POSITION_INT_DATA {
13657    #[doc = "Timestamp (time since system boot)."]
13658    pub time_boot_ms: u32,
13659    #[doc = "Latitude, expressed"]
13660    pub lat: i32,
13661    #[doc = "Longitude, expressed"]
13662    pub lon: i32,
13663    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13664    pub alt: i32,
13665    #[doc = "Altitude above home"]
13666    pub relative_alt: i32,
13667    #[doc = "Ground X Speed (Latitude, positive north)"]
13668    pub vx: i16,
13669    #[doc = "Ground Y Speed (Longitude, positive east)"]
13670    pub vy: i16,
13671    #[doc = "Ground Z Speed (Altitude, positive down)"]
13672    pub vz: i16,
13673    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13674    pub hdg: u16,
13675}
13676impl GLOBAL_POSITION_INT_DATA {
13677    pub const ENCODED_LEN: usize = 28usize;
13678    pub const DEFAULT: Self = Self {
13679        time_boot_ms: 0_u32,
13680        lat: 0_i32,
13681        lon: 0_i32,
13682        alt: 0_i32,
13683        relative_alt: 0_i32,
13684        vx: 0_i16,
13685        vy: 0_i16,
13686        vz: 0_i16,
13687        hdg: 0_u16,
13688    };
13689    #[cfg(feature = "arbitrary")]
13690    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13691        use arbitrary::{Arbitrary, Unstructured};
13692        let mut buf = [0u8; 1024];
13693        rng.fill_bytes(&mut buf);
13694        let mut unstructured = Unstructured::new(&buf);
13695        Self::arbitrary(&mut unstructured).unwrap_or_default()
13696    }
13697}
13698impl Default for GLOBAL_POSITION_INT_DATA {
13699    fn default() -> Self {
13700        Self::DEFAULT.clone()
13701    }
13702}
13703impl MessageData for GLOBAL_POSITION_INT_DATA {
13704    type Message = MavMessage;
13705    const ID: u32 = 33u32;
13706    const NAME: &'static str = "GLOBAL_POSITION_INT";
13707    const EXTRA_CRC: u8 = 104u8;
13708    const ENCODED_LEN: usize = 28usize;
13709    fn deser(
13710        _version: MavlinkVersion,
13711        __input: &[u8],
13712    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13713        let avail_len = __input.len();
13714        let mut payload_buf = [0; Self::ENCODED_LEN];
13715        let mut buf = if avail_len < Self::ENCODED_LEN {
13716            payload_buf[0..avail_len].copy_from_slice(__input);
13717            Bytes::new(&payload_buf)
13718        } else {
13719            Bytes::new(__input)
13720        };
13721        let mut __struct = Self::default();
13722        __struct.time_boot_ms = buf.get_u32_le();
13723        __struct.lat = buf.get_i32_le();
13724        __struct.lon = buf.get_i32_le();
13725        __struct.alt = buf.get_i32_le();
13726        __struct.relative_alt = buf.get_i32_le();
13727        __struct.vx = buf.get_i16_le();
13728        __struct.vy = buf.get_i16_le();
13729        __struct.vz = buf.get_i16_le();
13730        __struct.hdg = buf.get_u16_le();
13731        Ok(__struct)
13732    }
13733    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13734        let mut __tmp = BytesMut::new(bytes);
13735        #[allow(clippy::absurd_extreme_comparisons)]
13736        #[allow(unused_comparisons)]
13737        if __tmp.remaining() < Self::ENCODED_LEN {
13738            panic!(
13739                "buffer is too small (need {} bytes, but got {})",
13740                Self::ENCODED_LEN,
13741                __tmp.remaining(),
13742            )
13743        }
13744        __tmp.put_u32_le(self.time_boot_ms);
13745        __tmp.put_i32_le(self.lat);
13746        __tmp.put_i32_le(self.lon);
13747        __tmp.put_i32_le(self.alt);
13748        __tmp.put_i32_le(self.relative_alt);
13749        __tmp.put_i16_le(self.vx);
13750        __tmp.put_i16_le(self.vy);
13751        __tmp.put_i16_le(self.vz);
13752        __tmp.put_u16_le(self.hdg);
13753        if matches!(version, MavlinkVersion::V2) {
13754            let len = __tmp.len();
13755            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13756        } else {
13757            __tmp.len()
13758        }
13759    }
13760}
13761#[doc = "id: 63"]
13762#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13763#[derive(Debug, Clone, PartialEq)]
13764#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13765#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13766pub struct GLOBAL_POSITION_INT_COV_DATA {
13767    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13768    pub time_usec: u64,
13769    #[doc = "Latitude"]
13770    pub lat: i32,
13771    #[doc = "Longitude"]
13772    pub lon: i32,
13773    #[doc = "Altitude in meters above MSL"]
13774    pub alt: i32,
13775    #[doc = "Altitude above ground"]
13776    pub relative_alt: i32,
13777    #[doc = "Ground X Speed (Latitude)"]
13778    pub vx: f32,
13779    #[doc = "Ground Y Speed (Longitude)"]
13780    pub vy: f32,
13781    #[doc = "Ground Z Speed (Altitude)"]
13782    pub vz: f32,
13783    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13784    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13785    pub covariance: [f32; 36],
13786    #[doc = "Class id of the estimator this estimate originated from."]
13787    pub estimator_type: MavEstimatorType,
13788}
13789impl GLOBAL_POSITION_INT_COV_DATA {
13790    pub const ENCODED_LEN: usize = 181usize;
13791    pub const DEFAULT: Self = Self {
13792        time_usec: 0_u64,
13793        lat: 0_i32,
13794        lon: 0_i32,
13795        alt: 0_i32,
13796        relative_alt: 0_i32,
13797        vx: 0.0_f32,
13798        vy: 0.0_f32,
13799        vz: 0.0_f32,
13800        covariance: [0.0_f32; 36usize],
13801        estimator_type: MavEstimatorType::DEFAULT,
13802    };
13803    #[cfg(feature = "arbitrary")]
13804    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13805        use arbitrary::{Arbitrary, Unstructured};
13806        let mut buf = [0u8; 1024];
13807        rng.fill_bytes(&mut buf);
13808        let mut unstructured = Unstructured::new(&buf);
13809        Self::arbitrary(&mut unstructured).unwrap_or_default()
13810    }
13811}
13812impl Default for GLOBAL_POSITION_INT_COV_DATA {
13813    fn default() -> Self {
13814        Self::DEFAULT.clone()
13815    }
13816}
13817impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13818    type Message = MavMessage;
13819    const ID: u32 = 63u32;
13820    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13821    const EXTRA_CRC: u8 = 119u8;
13822    const ENCODED_LEN: usize = 181usize;
13823    fn deser(
13824        _version: MavlinkVersion,
13825        __input: &[u8],
13826    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13827        let avail_len = __input.len();
13828        let mut payload_buf = [0; Self::ENCODED_LEN];
13829        let mut buf = if avail_len < Self::ENCODED_LEN {
13830            payload_buf[0..avail_len].copy_from_slice(__input);
13831            Bytes::new(&payload_buf)
13832        } else {
13833            Bytes::new(__input)
13834        };
13835        let mut __struct = Self::default();
13836        __struct.time_usec = buf.get_u64_le();
13837        __struct.lat = buf.get_i32_le();
13838        __struct.lon = buf.get_i32_le();
13839        __struct.alt = buf.get_i32_le();
13840        __struct.relative_alt = buf.get_i32_le();
13841        __struct.vx = buf.get_f32_le();
13842        __struct.vy = buf.get_f32_le();
13843        __struct.vz = buf.get_f32_le();
13844        for v in &mut __struct.covariance {
13845            let val = buf.get_f32_le();
13846            *v = val;
13847        }
13848        let tmp = buf.get_u8();
13849        __struct.estimator_type =
13850            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13851                enum_type: "MavEstimatorType",
13852                value: tmp as u32,
13853            })?;
13854        Ok(__struct)
13855    }
13856    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13857        let mut __tmp = BytesMut::new(bytes);
13858        #[allow(clippy::absurd_extreme_comparisons)]
13859        #[allow(unused_comparisons)]
13860        if __tmp.remaining() < Self::ENCODED_LEN {
13861            panic!(
13862                "buffer is too small (need {} bytes, but got {})",
13863                Self::ENCODED_LEN,
13864                __tmp.remaining(),
13865            )
13866        }
13867        __tmp.put_u64_le(self.time_usec);
13868        __tmp.put_i32_le(self.lat);
13869        __tmp.put_i32_le(self.lon);
13870        __tmp.put_i32_le(self.alt);
13871        __tmp.put_i32_le(self.relative_alt);
13872        __tmp.put_f32_le(self.vx);
13873        __tmp.put_f32_le(self.vy);
13874        __tmp.put_f32_le(self.vz);
13875        for val in &self.covariance {
13876            __tmp.put_f32_le(*val);
13877        }
13878        __tmp.put_u8(self.estimator_type as u8);
13879        if matches!(version, MavlinkVersion::V2) {
13880            let len = __tmp.len();
13881            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13882        } else {
13883            __tmp.len()
13884        }
13885    }
13886}
13887#[doc = "id: 101"]
13888#[doc = "Global position/attitude estimate from a vision source."]
13889#[derive(Debug, Clone, PartialEq)]
13890#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13891#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13892pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13893    #[doc = "Timestamp (UNIX time or since system boot)"]
13894    pub usec: u64,
13895    #[doc = "Global X position"]
13896    pub x: f32,
13897    #[doc = "Global Y position"]
13898    pub y: f32,
13899    #[doc = "Global Z position"]
13900    pub z: f32,
13901    #[doc = "Roll angle"]
13902    pub roll: f32,
13903    #[doc = "Pitch angle"]
13904    pub pitch: f32,
13905    #[doc = "Yaw angle"]
13906    pub yaw: f32,
13907    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13908    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13909    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13910    pub covariance: [f32; 21],
13911    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13912    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13913    pub reset_counter: u8,
13914}
13915impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13916    pub const ENCODED_LEN: usize = 117usize;
13917    pub const DEFAULT: Self = Self {
13918        usec: 0_u64,
13919        x: 0.0_f32,
13920        y: 0.0_f32,
13921        z: 0.0_f32,
13922        roll: 0.0_f32,
13923        pitch: 0.0_f32,
13924        yaw: 0.0_f32,
13925        covariance: [0.0_f32; 21usize],
13926        reset_counter: 0_u8,
13927    };
13928    #[cfg(feature = "arbitrary")]
13929    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13930        use arbitrary::{Arbitrary, Unstructured};
13931        let mut buf = [0u8; 1024];
13932        rng.fill_bytes(&mut buf);
13933        let mut unstructured = Unstructured::new(&buf);
13934        Self::arbitrary(&mut unstructured).unwrap_or_default()
13935    }
13936}
13937impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13938    fn default() -> Self {
13939        Self::DEFAULT.clone()
13940    }
13941}
13942impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13943    type Message = MavMessage;
13944    const ID: u32 = 101u32;
13945    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13946    const EXTRA_CRC: u8 = 102u8;
13947    const ENCODED_LEN: usize = 117usize;
13948    fn deser(
13949        _version: MavlinkVersion,
13950        __input: &[u8],
13951    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13952        let avail_len = __input.len();
13953        let mut payload_buf = [0; Self::ENCODED_LEN];
13954        let mut buf = if avail_len < Self::ENCODED_LEN {
13955            payload_buf[0..avail_len].copy_from_slice(__input);
13956            Bytes::new(&payload_buf)
13957        } else {
13958            Bytes::new(__input)
13959        };
13960        let mut __struct = Self::default();
13961        __struct.usec = buf.get_u64_le();
13962        __struct.x = buf.get_f32_le();
13963        __struct.y = buf.get_f32_le();
13964        __struct.z = buf.get_f32_le();
13965        __struct.roll = buf.get_f32_le();
13966        __struct.pitch = buf.get_f32_le();
13967        __struct.yaw = buf.get_f32_le();
13968        for v in &mut __struct.covariance {
13969            let val = buf.get_f32_le();
13970            *v = val;
13971        }
13972        __struct.reset_counter = buf.get_u8();
13973        Ok(__struct)
13974    }
13975    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13976        let mut __tmp = BytesMut::new(bytes);
13977        #[allow(clippy::absurd_extreme_comparisons)]
13978        #[allow(unused_comparisons)]
13979        if __tmp.remaining() < Self::ENCODED_LEN {
13980            panic!(
13981                "buffer is too small (need {} bytes, but got {})",
13982                Self::ENCODED_LEN,
13983                __tmp.remaining(),
13984            )
13985        }
13986        __tmp.put_u64_le(self.usec);
13987        __tmp.put_f32_le(self.x);
13988        __tmp.put_f32_le(self.y);
13989        __tmp.put_f32_le(self.z);
13990        __tmp.put_f32_le(self.roll);
13991        __tmp.put_f32_le(self.pitch);
13992        __tmp.put_f32_le(self.yaw);
13993        for val in &self.covariance {
13994            __tmp.put_f32_le(*val);
13995        }
13996        __tmp.put_u8(self.reset_counter);
13997        if matches!(version, MavlinkVersion::V2) {
13998            let len = __tmp.len();
13999            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14000        } else {
14001            __tmp.len()
14002        }
14003    }
14004}
14005#[doc = "id: 124"]
14006#[doc = "Second GPS data."]
14007#[derive(Debug, Clone, PartialEq)]
14008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14010pub struct GPS2_RAW_DATA {
14011    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14012    pub time_usec: u64,
14013    #[doc = "Latitude (WGS84)"]
14014    pub lat: i32,
14015    #[doc = "Longitude (WGS84)"]
14016    pub lon: i32,
14017    #[doc = "Altitude (MSL). Positive for up."]
14018    pub alt: i32,
14019    #[doc = "Age of DGPS info"]
14020    pub dgps_age: u32,
14021    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14022    pub eph: u16,
14023    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14024    pub epv: u16,
14025    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14026    pub vel: u16,
14027    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14028    pub cog: u16,
14029    #[doc = "GPS fix type."]
14030    pub fix_type: GpsFixType,
14031    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14032    pub satellites_visible: u8,
14033    #[doc = "Number of DGPS satellites"]
14034    pub dgps_numch: u8,
14035    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14036    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14037    pub yaw: u16,
14038    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14039    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14040    pub alt_ellipsoid: i32,
14041    #[doc = "Position uncertainty."]
14042    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14043    pub h_acc: u32,
14044    #[doc = "Altitude uncertainty."]
14045    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14046    pub v_acc: u32,
14047    #[doc = "Speed uncertainty."]
14048    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14049    pub vel_acc: u32,
14050    #[doc = "Heading / track uncertainty"]
14051    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14052    pub hdg_acc: u32,
14053}
14054impl GPS2_RAW_DATA {
14055    pub const ENCODED_LEN: usize = 57usize;
14056    pub const DEFAULT: Self = Self {
14057        time_usec: 0_u64,
14058        lat: 0_i32,
14059        lon: 0_i32,
14060        alt: 0_i32,
14061        dgps_age: 0_u32,
14062        eph: 0_u16,
14063        epv: 0_u16,
14064        vel: 0_u16,
14065        cog: 0_u16,
14066        fix_type: GpsFixType::DEFAULT,
14067        satellites_visible: 0_u8,
14068        dgps_numch: 0_u8,
14069        yaw: 0_u16,
14070        alt_ellipsoid: 0_i32,
14071        h_acc: 0_u32,
14072        v_acc: 0_u32,
14073        vel_acc: 0_u32,
14074        hdg_acc: 0_u32,
14075    };
14076    #[cfg(feature = "arbitrary")]
14077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14078        use arbitrary::{Arbitrary, Unstructured};
14079        let mut buf = [0u8; 1024];
14080        rng.fill_bytes(&mut buf);
14081        let mut unstructured = Unstructured::new(&buf);
14082        Self::arbitrary(&mut unstructured).unwrap_or_default()
14083    }
14084}
14085impl Default for GPS2_RAW_DATA {
14086    fn default() -> Self {
14087        Self::DEFAULT.clone()
14088    }
14089}
14090impl MessageData for GPS2_RAW_DATA {
14091    type Message = MavMessage;
14092    const ID: u32 = 124u32;
14093    const NAME: &'static str = "GPS2_RAW";
14094    const EXTRA_CRC: u8 = 87u8;
14095    const ENCODED_LEN: usize = 57usize;
14096    fn deser(
14097        _version: MavlinkVersion,
14098        __input: &[u8],
14099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14100        let avail_len = __input.len();
14101        let mut payload_buf = [0; Self::ENCODED_LEN];
14102        let mut buf = if avail_len < Self::ENCODED_LEN {
14103            payload_buf[0..avail_len].copy_from_slice(__input);
14104            Bytes::new(&payload_buf)
14105        } else {
14106            Bytes::new(__input)
14107        };
14108        let mut __struct = Self::default();
14109        __struct.time_usec = buf.get_u64_le();
14110        __struct.lat = buf.get_i32_le();
14111        __struct.lon = buf.get_i32_le();
14112        __struct.alt = buf.get_i32_le();
14113        __struct.dgps_age = buf.get_u32_le();
14114        __struct.eph = buf.get_u16_le();
14115        __struct.epv = buf.get_u16_le();
14116        __struct.vel = buf.get_u16_le();
14117        __struct.cog = buf.get_u16_le();
14118        let tmp = buf.get_u8();
14119        __struct.fix_type =
14120            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14121                enum_type: "GpsFixType",
14122                value: tmp as u32,
14123            })?;
14124        __struct.satellites_visible = buf.get_u8();
14125        __struct.dgps_numch = buf.get_u8();
14126        __struct.yaw = buf.get_u16_le();
14127        __struct.alt_ellipsoid = buf.get_i32_le();
14128        __struct.h_acc = buf.get_u32_le();
14129        __struct.v_acc = buf.get_u32_le();
14130        __struct.vel_acc = buf.get_u32_le();
14131        __struct.hdg_acc = buf.get_u32_le();
14132        Ok(__struct)
14133    }
14134    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14135        let mut __tmp = BytesMut::new(bytes);
14136        #[allow(clippy::absurd_extreme_comparisons)]
14137        #[allow(unused_comparisons)]
14138        if __tmp.remaining() < Self::ENCODED_LEN {
14139            panic!(
14140                "buffer is too small (need {} bytes, but got {})",
14141                Self::ENCODED_LEN,
14142                __tmp.remaining(),
14143            )
14144        }
14145        __tmp.put_u64_le(self.time_usec);
14146        __tmp.put_i32_le(self.lat);
14147        __tmp.put_i32_le(self.lon);
14148        __tmp.put_i32_le(self.alt);
14149        __tmp.put_u32_le(self.dgps_age);
14150        __tmp.put_u16_le(self.eph);
14151        __tmp.put_u16_le(self.epv);
14152        __tmp.put_u16_le(self.vel);
14153        __tmp.put_u16_le(self.cog);
14154        __tmp.put_u8(self.fix_type as u8);
14155        __tmp.put_u8(self.satellites_visible);
14156        __tmp.put_u8(self.dgps_numch);
14157        __tmp.put_u16_le(self.yaw);
14158        __tmp.put_i32_le(self.alt_ellipsoid);
14159        __tmp.put_u32_le(self.h_acc);
14160        __tmp.put_u32_le(self.v_acc);
14161        __tmp.put_u32_le(self.vel_acc);
14162        __tmp.put_u32_le(self.hdg_acc);
14163        if matches!(version, MavlinkVersion::V2) {
14164            let len = __tmp.len();
14165            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14166        } else {
14167            __tmp.len()
14168        }
14169    }
14170}
14171#[doc = "id: 128"]
14172#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14173#[derive(Debug, Clone, PartialEq)]
14174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14175#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14176pub struct GPS2_RTK_DATA {
14177    #[doc = "Time since boot of last baseline message received."]
14178    pub time_last_baseline_ms: u32,
14179    #[doc = "GPS Time of Week of last baseline"]
14180    pub tow: u32,
14181    #[doc = "Current baseline in ECEF x or NED north component."]
14182    pub baseline_a_mm: i32,
14183    #[doc = "Current baseline in ECEF y or NED east component."]
14184    pub baseline_b_mm: i32,
14185    #[doc = "Current baseline in ECEF z or NED down component."]
14186    pub baseline_c_mm: i32,
14187    #[doc = "Current estimate of baseline accuracy."]
14188    pub accuracy: u32,
14189    #[doc = "Current number of integer ambiguity hypotheses."]
14190    pub iar_num_hypotheses: i32,
14191    #[doc = "GPS Week Number of last baseline"]
14192    pub wn: u16,
14193    #[doc = "Identification of connected RTK receiver."]
14194    pub rtk_receiver_id: u8,
14195    #[doc = "GPS-specific health report for RTK data."]
14196    pub rtk_health: u8,
14197    #[doc = "Rate of baseline messages being received by GPS"]
14198    pub rtk_rate: u8,
14199    #[doc = "Current number of sats used for RTK calculation."]
14200    pub nsats: u8,
14201    #[doc = "Coordinate system of baseline"]
14202    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14203}
14204impl GPS2_RTK_DATA {
14205    pub const ENCODED_LEN: usize = 35usize;
14206    pub const DEFAULT: Self = Self {
14207        time_last_baseline_ms: 0_u32,
14208        tow: 0_u32,
14209        baseline_a_mm: 0_i32,
14210        baseline_b_mm: 0_i32,
14211        baseline_c_mm: 0_i32,
14212        accuracy: 0_u32,
14213        iar_num_hypotheses: 0_i32,
14214        wn: 0_u16,
14215        rtk_receiver_id: 0_u8,
14216        rtk_health: 0_u8,
14217        rtk_rate: 0_u8,
14218        nsats: 0_u8,
14219        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14220    };
14221    #[cfg(feature = "arbitrary")]
14222    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14223        use arbitrary::{Arbitrary, Unstructured};
14224        let mut buf = [0u8; 1024];
14225        rng.fill_bytes(&mut buf);
14226        let mut unstructured = Unstructured::new(&buf);
14227        Self::arbitrary(&mut unstructured).unwrap_or_default()
14228    }
14229}
14230impl Default for GPS2_RTK_DATA {
14231    fn default() -> Self {
14232        Self::DEFAULT.clone()
14233    }
14234}
14235impl MessageData for GPS2_RTK_DATA {
14236    type Message = MavMessage;
14237    const ID: u32 = 128u32;
14238    const NAME: &'static str = "GPS2_RTK";
14239    const EXTRA_CRC: u8 = 226u8;
14240    const ENCODED_LEN: usize = 35usize;
14241    fn deser(
14242        _version: MavlinkVersion,
14243        __input: &[u8],
14244    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14245        let avail_len = __input.len();
14246        let mut payload_buf = [0; Self::ENCODED_LEN];
14247        let mut buf = if avail_len < Self::ENCODED_LEN {
14248            payload_buf[0..avail_len].copy_from_slice(__input);
14249            Bytes::new(&payload_buf)
14250        } else {
14251            Bytes::new(__input)
14252        };
14253        let mut __struct = Self::default();
14254        __struct.time_last_baseline_ms = buf.get_u32_le();
14255        __struct.tow = buf.get_u32_le();
14256        __struct.baseline_a_mm = buf.get_i32_le();
14257        __struct.baseline_b_mm = buf.get_i32_le();
14258        __struct.baseline_c_mm = buf.get_i32_le();
14259        __struct.accuracy = buf.get_u32_le();
14260        __struct.iar_num_hypotheses = buf.get_i32_le();
14261        __struct.wn = buf.get_u16_le();
14262        __struct.rtk_receiver_id = buf.get_u8();
14263        __struct.rtk_health = buf.get_u8();
14264        __struct.rtk_rate = buf.get_u8();
14265        __struct.nsats = buf.get_u8();
14266        let tmp = buf.get_u8();
14267        __struct.baseline_coords_type =
14268            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14269                enum_type: "RtkBaselineCoordinateSystem",
14270                value: tmp as u32,
14271            })?;
14272        Ok(__struct)
14273    }
14274    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14275        let mut __tmp = BytesMut::new(bytes);
14276        #[allow(clippy::absurd_extreme_comparisons)]
14277        #[allow(unused_comparisons)]
14278        if __tmp.remaining() < Self::ENCODED_LEN {
14279            panic!(
14280                "buffer is too small (need {} bytes, but got {})",
14281                Self::ENCODED_LEN,
14282                __tmp.remaining(),
14283            )
14284        }
14285        __tmp.put_u32_le(self.time_last_baseline_ms);
14286        __tmp.put_u32_le(self.tow);
14287        __tmp.put_i32_le(self.baseline_a_mm);
14288        __tmp.put_i32_le(self.baseline_b_mm);
14289        __tmp.put_i32_le(self.baseline_c_mm);
14290        __tmp.put_u32_le(self.accuracy);
14291        __tmp.put_i32_le(self.iar_num_hypotheses);
14292        __tmp.put_u16_le(self.wn);
14293        __tmp.put_u8(self.rtk_receiver_id);
14294        __tmp.put_u8(self.rtk_health);
14295        __tmp.put_u8(self.rtk_rate);
14296        __tmp.put_u8(self.nsats);
14297        __tmp.put_u8(self.baseline_coords_type as u8);
14298        if matches!(version, MavlinkVersion::V2) {
14299            let len = __tmp.len();
14300            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14301        } else {
14302            __tmp.len()
14303        }
14304    }
14305}
14306#[doc = "id: 49"]
14307#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14308#[derive(Debug, Clone, PartialEq)]
14309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14310#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14311pub struct GPS_GLOBAL_ORIGIN_DATA {
14312    #[doc = "Latitude (WGS84)"]
14313    pub latitude: i32,
14314    #[doc = "Longitude (WGS84)"]
14315    pub longitude: i32,
14316    #[doc = "Altitude (MSL). Positive for up."]
14317    pub altitude: i32,
14318    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14319    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14320    pub time_usec: u64,
14321}
14322impl GPS_GLOBAL_ORIGIN_DATA {
14323    pub const ENCODED_LEN: usize = 20usize;
14324    pub const DEFAULT: Self = Self {
14325        latitude: 0_i32,
14326        longitude: 0_i32,
14327        altitude: 0_i32,
14328        time_usec: 0_u64,
14329    };
14330    #[cfg(feature = "arbitrary")]
14331    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14332        use arbitrary::{Arbitrary, Unstructured};
14333        let mut buf = [0u8; 1024];
14334        rng.fill_bytes(&mut buf);
14335        let mut unstructured = Unstructured::new(&buf);
14336        Self::arbitrary(&mut unstructured).unwrap_or_default()
14337    }
14338}
14339impl Default for GPS_GLOBAL_ORIGIN_DATA {
14340    fn default() -> Self {
14341        Self::DEFAULT.clone()
14342    }
14343}
14344impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14345    type Message = MavMessage;
14346    const ID: u32 = 49u32;
14347    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14348    const EXTRA_CRC: u8 = 39u8;
14349    const ENCODED_LEN: usize = 20usize;
14350    fn deser(
14351        _version: MavlinkVersion,
14352        __input: &[u8],
14353    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14354        let avail_len = __input.len();
14355        let mut payload_buf = [0; Self::ENCODED_LEN];
14356        let mut buf = if avail_len < Self::ENCODED_LEN {
14357            payload_buf[0..avail_len].copy_from_slice(__input);
14358            Bytes::new(&payload_buf)
14359        } else {
14360            Bytes::new(__input)
14361        };
14362        let mut __struct = Self::default();
14363        __struct.latitude = buf.get_i32_le();
14364        __struct.longitude = buf.get_i32_le();
14365        __struct.altitude = buf.get_i32_le();
14366        __struct.time_usec = buf.get_u64_le();
14367        Ok(__struct)
14368    }
14369    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14370        let mut __tmp = BytesMut::new(bytes);
14371        #[allow(clippy::absurd_extreme_comparisons)]
14372        #[allow(unused_comparisons)]
14373        if __tmp.remaining() < Self::ENCODED_LEN {
14374            panic!(
14375                "buffer is too small (need {} bytes, but got {})",
14376                Self::ENCODED_LEN,
14377                __tmp.remaining(),
14378            )
14379        }
14380        __tmp.put_i32_le(self.latitude);
14381        __tmp.put_i32_le(self.longitude);
14382        __tmp.put_i32_le(self.altitude);
14383        __tmp.put_u64_le(self.time_usec);
14384        if matches!(version, MavlinkVersion::V2) {
14385            let len = __tmp.len();
14386            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14387        } else {
14388            __tmp.len()
14389        }
14390    }
14391}
14392#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14393#[doc = "id: 123"]
14394#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14395#[derive(Debug, Clone, PartialEq)]
14396#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14397#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14398pub struct GPS_INJECT_DATA_DATA {
14399    #[doc = "System ID"]
14400    pub target_system: u8,
14401    #[doc = "Component ID"]
14402    pub target_component: u8,
14403    #[doc = "Data length"]
14404    pub len: u8,
14405    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14406    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14407    pub data: [u8; 110],
14408}
14409impl GPS_INJECT_DATA_DATA {
14410    pub const ENCODED_LEN: usize = 113usize;
14411    pub const DEFAULT: Self = Self {
14412        target_system: 0_u8,
14413        target_component: 0_u8,
14414        len: 0_u8,
14415        data: [0_u8; 110usize],
14416    };
14417    #[cfg(feature = "arbitrary")]
14418    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14419        use arbitrary::{Arbitrary, Unstructured};
14420        let mut buf = [0u8; 1024];
14421        rng.fill_bytes(&mut buf);
14422        let mut unstructured = Unstructured::new(&buf);
14423        Self::arbitrary(&mut unstructured).unwrap_or_default()
14424    }
14425}
14426impl Default for GPS_INJECT_DATA_DATA {
14427    fn default() -> Self {
14428        Self::DEFAULT.clone()
14429    }
14430}
14431impl MessageData for GPS_INJECT_DATA_DATA {
14432    type Message = MavMessage;
14433    const ID: u32 = 123u32;
14434    const NAME: &'static str = "GPS_INJECT_DATA";
14435    const EXTRA_CRC: u8 = 250u8;
14436    const ENCODED_LEN: usize = 113usize;
14437    fn deser(
14438        _version: MavlinkVersion,
14439        __input: &[u8],
14440    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14441        let avail_len = __input.len();
14442        let mut payload_buf = [0; Self::ENCODED_LEN];
14443        let mut buf = if avail_len < Self::ENCODED_LEN {
14444            payload_buf[0..avail_len].copy_from_slice(__input);
14445            Bytes::new(&payload_buf)
14446        } else {
14447            Bytes::new(__input)
14448        };
14449        let mut __struct = Self::default();
14450        __struct.target_system = buf.get_u8();
14451        __struct.target_component = buf.get_u8();
14452        __struct.len = buf.get_u8();
14453        for v in &mut __struct.data {
14454            let val = buf.get_u8();
14455            *v = val;
14456        }
14457        Ok(__struct)
14458    }
14459    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14460        let mut __tmp = BytesMut::new(bytes);
14461        #[allow(clippy::absurd_extreme_comparisons)]
14462        #[allow(unused_comparisons)]
14463        if __tmp.remaining() < Self::ENCODED_LEN {
14464            panic!(
14465                "buffer is too small (need {} bytes, but got {})",
14466                Self::ENCODED_LEN,
14467                __tmp.remaining(),
14468            )
14469        }
14470        __tmp.put_u8(self.target_system);
14471        __tmp.put_u8(self.target_component);
14472        __tmp.put_u8(self.len);
14473        for val in &self.data {
14474            __tmp.put_u8(*val);
14475        }
14476        if matches!(version, MavlinkVersion::V2) {
14477            let len = __tmp.len();
14478            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14479        } else {
14480            __tmp.len()
14481        }
14482    }
14483}
14484#[doc = "id: 232"]
14485#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14486#[derive(Debug, Clone, PartialEq)]
14487#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14488#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14489pub struct GPS_INPUT_DATA {
14490    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14491    pub time_usec: u64,
14492    #[doc = "GPS time (from start of GPS week)"]
14493    pub time_week_ms: u32,
14494    #[doc = "Latitude (WGS84)"]
14495    pub lat: i32,
14496    #[doc = "Longitude (WGS84)"]
14497    pub lon: i32,
14498    #[doc = "Altitude (MSL). Positive for up."]
14499    pub alt: f32,
14500    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14501    pub hdop: f32,
14502    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14503    pub vdop: f32,
14504    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14505    pub vn: f32,
14506    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14507    pub ve: f32,
14508    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14509    pub vd: f32,
14510    #[doc = "GPS speed accuracy"]
14511    pub speed_accuracy: f32,
14512    #[doc = "GPS horizontal accuracy"]
14513    pub horiz_accuracy: f32,
14514    #[doc = "GPS vertical accuracy"]
14515    pub vert_accuracy: f32,
14516    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14517    pub ignore_flags: GpsInputIgnoreFlags,
14518    #[doc = "GPS week number"]
14519    pub time_week: u16,
14520    #[doc = "ID of the GPS for multiple GPS inputs"]
14521    pub gps_id: u8,
14522    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14523    pub fix_type: u8,
14524    #[doc = "Number of satellites visible."]
14525    pub satellites_visible: u8,
14526    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14527    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14528    pub yaw: u16,
14529}
14530impl GPS_INPUT_DATA {
14531    pub const ENCODED_LEN: usize = 65usize;
14532    pub const DEFAULT: Self = Self {
14533        time_usec: 0_u64,
14534        time_week_ms: 0_u32,
14535        lat: 0_i32,
14536        lon: 0_i32,
14537        alt: 0.0_f32,
14538        hdop: 0.0_f32,
14539        vdop: 0.0_f32,
14540        vn: 0.0_f32,
14541        ve: 0.0_f32,
14542        vd: 0.0_f32,
14543        speed_accuracy: 0.0_f32,
14544        horiz_accuracy: 0.0_f32,
14545        vert_accuracy: 0.0_f32,
14546        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14547        time_week: 0_u16,
14548        gps_id: 0_u8,
14549        fix_type: 0_u8,
14550        satellites_visible: 0_u8,
14551        yaw: 0_u16,
14552    };
14553    #[cfg(feature = "arbitrary")]
14554    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14555        use arbitrary::{Arbitrary, Unstructured};
14556        let mut buf = [0u8; 1024];
14557        rng.fill_bytes(&mut buf);
14558        let mut unstructured = Unstructured::new(&buf);
14559        Self::arbitrary(&mut unstructured).unwrap_or_default()
14560    }
14561}
14562impl Default for GPS_INPUT_DATA {
14563    fn default() -> Self {
14564        Self::DEFAULT.clone()
14565    }
14566}
14567impl MessageData for GPS_INPUT_DATA {
14568    type Message = MavMessage;
14569    const ID: u32 = 232u32;
14570    const NAME: &'static str = "GPS_INPUT";
14571    const EXTRA_CRC: u8 = 151u8;
14572    const ENCODED_LEN: usize = 65usize;
14573    fn deser(
14574        _version: MavlinkVersion,
14575        __input: &[u8],
14576    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14577        let avail_len = __input.len();
14578        let mut payload_buf = [0; Self::ENCODED_LEN];
14579        let mut buf = if avail_len < Self::ENCODED_LEN {
14580            payload_buf[0..avail_len].copy_from_slice(__input);
14581            Bytes::new(&payload_buf)
14582        } else {
14583            Bytes::new(__input)
14584        };
14585        let mut __struct = Self::default();
14586        __struct.time_usec = buf.get_u64_le();
14587        __struct.time_week_ms = buf.get_u32_le();
14588        __struct.lat = buf.get_i32_le();
14589        __struct.lon = buf.get_i32_le();
14590        __struct.alt = buf.get_f32_le();
14591        __struct.hdop = buf.get_f32_le();
14592        __struct.vdop = buf.get_f32_le();
14593        __struct.vn = buf.get_f32_le();
14594        __struct.ve = buf.get_f32_le();
14595        __struct.vd = buf.get_f32_le();
14596        __struct.speed_accuracy = buf.get_f32_le();
14597        __struct.horiz_accuracy = buf.get_f32_le();
14598        __struct.vert_accuracy = buf.get_f32_le();
14599        let tmp = buf.get_u16_le();
14600        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14601            tmp & GpsInputIgnoreFlags::all().bits(),
14602        )
14603        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14604            flag_type: "GpsInputIgnoreFlags",
14605            value: tmp as u32,
14606        })?;
14607        __struct.time_week = buf.get_u16_le();
14608        __struct.gps_id = buf.get_u8();
14609        __struct.fix_type = buf.get_u8();
14610        __struct.satellites_visible = buf.get_u8();
14611        __struct.yaw = buf.get_u16_le();
14612        Ok(__struct)
14613    }
14614    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14615        let mut __tmp = BytesMut::new(bytes);
14616        #[allow(clippy::absurd_extreme_comparisons)]
14617        #[allow(unused_comparisons)]
14618        if __tmp.remaining() < Self::ENCODED_LEN {
14619            panic!(
14620                "buffer is too small (need {} bytes, but got {})",
14621                Self::ENCODED_LEN,
14622                __tmp.remaining(),
14623            )
14624        }
14625        __tmp.put_u64_le(self.time_usec);
14626        __tmp.put_u32_le(self.time_week_ms);
14627        __tmp.put_i32_le(self.lat);
14628        __tmp.put_i32_le(self.lon);
14629        __tmp.put_f32_le(self.alt);
14630        __tmp.put_f32_le(self.hdop);
14631        __tmp.put_f32_le(self.vdop);
14632        __tmp.put_f32_le(self.vn);
14633        __tmp.put_f32_le(self.ve);
14634        __tmp.put_f32_le(self.vd);
14635        __tmp.put_f32_le(self.speed_accuracy);
14636        __tmp.put_f32_le(self.horiz_accuracy);
14637        __tmp.put_f32_le(self.vert_accuracy);
14638        __tmp.put_u16_le(self.ignore_flags.bits());
14639        __tmp.put_u16_le(self.time_week);
14640        __tmp.put_u8(self.gps_id);
14641        __tmp.put_u8(self.fix_type);
14642        __tmp.put_u8(self.satellites_visible);
14643        __tmp.put_u16_le(self.yaw);
14644        if matches!(version, MavlinkVersion::V2) {
14645            let len = __tmp.len();
14646            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14647        } else {
14648            __tmp.len()
14649        }
14650    }
14651}
14652#[doc = "id: 24"]
14653#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14654#[derive(Debug, Clone, PartialEq)]
14655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14657pub struct GPS_RAW_INT_DATA {
14658    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14659    pub time_usec: u64,
14660    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14661    pub lat: i32,
14662    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14663    pub lon: i32,
14664    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14665    pub alt: i32,
14666    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14667    pub eph: u16,
14668    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14669    pub epv: u16,
14670    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14671    pub vel: u16,
14672    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14673    pub cog: u16,
14674    #[doc = "GPS fix type."]
14675    pub fix_type: GpsFixType,
14676    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14677    pub satellites_visible: u8,
14678    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14679    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14680    pub alt_ellipsoid: i32,
14681    #[doc = "Position uncertainty."]
14682    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14683    pub h_acc: u32,
14684    #[doc = "Altitude uncertainty."]
14685    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14686    pub v_acc: u32,
14687    #[doc = "Speed uncertainty."]
14688    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14689    pub vel_acc: u32,
14690    #[doc = "Heading / track uncertainty"]
14691    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14692    pub hdg_acc: u32,
14693    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14694    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14695    pub yaw: u16,
14696}
14697impl GPS_RAW_INT_DATA {
14698    pub const ENCODED_LEN: usize = 52usize;
14699    pub const DEFAULT: Self = Self {
14700        time_usec: 0_u64,
14701        lat: 0_i32,
14702        lon: 0_i32,
14703        alt: 0_i32,
14704        eph: 0_u16,
14705        epv: 0_u16,
14706        vel: 0_u16,
14707        cog: 0_u16,
14708        fix_type: GpsFixType::DEFAULT,
14709        satellites_visible: 0_u8,
14710        alt_ellipsoid: 0_i32,
14711        h_acc: 0_u32,
14712        v_acc: 0_u32,
14713        vel_acc: 0_u32,
14714        hdg_acc: 0_u32,
14715        yaw: 0_u16,
14716    };
14717    #[cfg(feature = "arbitrary")]
14718    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14719        use arbitrary::{Arbitrary, Unstructured};
14720        let mut buf = [0u8; 1024];
14721        rng.fill_bytes(&mut buf);
14722        let mut unstructured = Unstructured::new(&buf);
14723        Self::arbitrary(&mut unstructured).unwrap_or_default()
14724    }
14725}
14726impl Default for GPS_RAW_INT_DATA {
14727    fn default() -> Self {
14728        Self::DEFAULT.clone()
14729    }
14730}
14731impl MessageData for GPS_RAW_INT_DATA {
14732    type Message = MavMessage;
14733    const ID: u32 = 24u32;
14734    const NAME: &'static str = "GPS_RAW_INT";
14735    const EXTRA_CRC: u8 = 24u8;
14736    const ENCODED_LEN: usize = 52usize;
14737    fn deser(
14738        _version: MavlinkVersion,
14739        __input: &[u8],
14740    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14741        let avail_len = __input.len();
14742        let mut payload_buf = [0; Self::ENCODED_LEN];
14743        let mut buf = if avail_len < Self::ENCODED_LEN {
14744            payload_buf[0..avail_len].copy_from_slice(__input);
14745            Bytes::new(&payload_buf)
14746        } else {
14747            Bytes::new(__input)
14748        };
14749        let mut __struct = Self::default();
14750        __struct.time_usec = buf.get_u64_le();
14751        __struct.lat = buf.get_i32_le();
14752        __struct.lon = buf.get_i32_le();
14753        __struct.alt = buf.get_i32_le();
14754        __struct.eph = buf.get_u16_le();
14755        __struct.epv = buf.get_u16_le();
14756        __struct.vel = buf.get_u16_le();
14757        __struct.cog = buf.get_u16_le();
14758        let tmp = buf.get_u8();
14759        __struct.fix_type =
14760            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14761                enum_type: "GpsFixType",
14762                value: tmp as u32,
14763            })?;
14764        __struct.satellites_visible = buf.get_u8();
14765        __struct.alt_ellipsoid = buf.get_i32_le();
14766        __struct.h_acc = buf.get_u32_le();
14767        __struct.v_acc = buf.get_u32_le();
14768        __struct.vel_acc = buf.get_u32_le();
14769        __struct.hdg_acc = buf.get_u32_le();
14770        __struct.yaw = buf.get_u16_le();
14771        Ok(__struct)
14772    }
14773    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14774        let mut __tmp = BytesMut::new(bytes);
14775        #[allow(clippy::absurd_extreme_comparisons)]
14776        #[allow(unused_comparisons)]
14777        if __tmp.remaining() < Self::ENCODED_LEN {
14778            panic!(
14779                "buffer is too small (need {} bytes, but got {})",
14780                Self::ENCODED_LEN,
14781                __tmp.remaining(),
14782            )
14783        }
14784        __tmp.put_u64_le(self.time_usec);
14785        __tmp.put_i32_le(self.lat);
14786        __tmp.put_i32_le(self.lon);
14787        __tmp.put_i32_le(self.alt);
14788        __tmp.put_u16_le(self.eph);
14789        __tmp.put_u16_le(self.epv);
14790        __tmp.put_u16_le(self.vel);
14791        __tmp.put_u16_le(self.cog);
14792        __tmp.put_u8(self.fix_type as u8);
14793        __tmp.put_u8(self.satellites_visible);
14794        __tmp.put_i32_le(self.alt_ellipsoid);
14795        __tmp.put_u32_le(self.h_acc);
14796        __tmp.put_u32_le(self.v_acc);
14797        __tmp.put_u32_le(self.vel_acc);
14798        __tmp.put_u32_le(self.hdg_acc);
14799        __tmp.put_u16_le(self.yaw);
14800        if matches!(version, MavlinkVersion::V2) {
14801            let len = __tmp.len();
14802            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14803        } else {
14804            __tmp.len()
14805        }
14806    }
14807}
14808#[doc = "id: 233"]
14809#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14810#[derive(Debug, Clone, PartialEq)]
14811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14812#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14813pub struct GPS_RTCM_DATA_DATA {
14814    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14815    pub flags: u8,
14816    #[doc = "data length"]
14817    pub len: u8,
14818    #[doc = "RTCM message (may be fragmented)"]
14819    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14820    pub data: [u8; 180],
14821}
14822impl GPS_RTCM_DATA_DATA {
14823    pub const ENCODED_LEN: usize = 182usize;
14824    pub const DEFAULT: Self = Self {
14825        flags: 0_u8,
14826        len: 0_u8,
14827        data: [0_u8; 180usize],
14828    };
14829    #[cfg(feature = "arbitrary")]
14830    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14831        use arbitrary::{Arbitrary, Unstructured};
14832        let mut buf = [0u8; 1024];
14833        rng.fill_bytes(&mut buf);
14834        let mut unstructured = Unstructured::new(&buf);
14835        Self::arbitrary(&mut unstructured).unwrap_or_default()
14836    }
14837}
14838impl Default for GPS_RTCM_DATA_DATA {
14839    fn default() -> Self {
14840        Self::DEFAULT.clone()
14841    }
14842}
14843impl MessageData for GPS_RTCM_DATA_DATA {
14844    type Message = MavMessage;
14845    const ID: u32 = 233u32;
14846    const NAME: &'static str = "GPS_RTCM_DATA";
14847    const EXTRA_CRC: u8 = 35u8;
14848    const ENCODED_LEN: usize = 182usize;
14849    fn deser(
14850        _version: MavlinkVersion,
14851        __input: &[u8],
14852    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14853        let avail_len = __input.len();
14854        let mut payload_buf = [0; Self::ENCODED_LEN];
14855        let mut buf = if avail_len < Self::ENCODED_LEN {
14856            payload_buf[0..avail_len].copy_from_slice(__input);
14857            Bytes::new(&payload_buf)
14858        } else {
14859            Bytes::new(__input)
14860        };
14861        let mut __struct = Self::default();
14862        __struct.flags = buf.get_u8();
14863        __struct.len = buf.get_u8();
14864        for v in &mut __struct.data {
14865            let val = buf.get_u8();
14866            *v = val;
14867        }
14868        Ok(__struct)
14869    }
14870    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14871        let mut __tmp = BytesMut::new(bytes);
14872        #[allow(clippy::absurd_extreme_comparisons)]
14873        #[allow(unused_comparisons)]
14874        if __tmp.remaining() < Self::ENCODED_LEN {
14875            panic!(
14876                "buffer is too small (need {} bytes, but got {})",
14877                Self::ENCODED_LEN,
14878                __tmp.remaining(),
14879            )
14880        }
14881        __tmp.put_u8(self.flags);
14882        __tmp.put_u8(self.len);
14883        for val in &self.data {
14884            __tmp.put_u8(*val);
14885        }
14886        if matches!(version, MavlinkVersion::V2) {
14887            let len = __tmp.len();
14888            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14889        } else {
14890            __tmp.len()
14891        }
14892    }
14893}
14894#[doc = "id: 127"]
14895#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14896#[derive(Debug, Clone, PartialEq)]
14897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14899pub struct GPS_RTK_DATA {
14900    #[doc = "Time since boot of last baseline message received."]
14901    pub time_last_baseline_ms: u32,
14902    #[doc = "GPS Time of Week of last baseline"]
14903    pub tow: u32,
14904    #[doc = "Current baseline in ECEF x or NED north component."]
14905    pub baseline_a_mm: i32,
14906    #[doc = "Current baseline in ECEF y or NED east component."]
14907    pub baseline_b_mm: i32,
14908    #[doc = "Current baseline in ECEF z or NED down component."]
14909    pub baseline_c_mm: i32,
14910    #[doc = "Current estimate of baseline accuracy."]
14911    pub accuracy: u32,
14912    #[doc = "Current number of integer ambiguity hypotheses."]
14913    pub iar_num_hypotheses: i32,
14914    #[doc = "GPS Week Number of last baseline"]
14915    pub wn: u16,
14916    #[doc = "Identification of connected RTK receiver."]
14917    pub rtk_receiver_id: u8,
14918    #[doc = "GPS-specific health report for RTK data."]
14919    pub rtk_health: u8,
14920    #[doc = "Rate of baseline messages being received by GPS"]
14921    pub rtk_rate: u8,
14922    #[doc = "Current number of sats used for RTK calculation."]
14923    pub nsats: u8,
14924    #[doc = "Coordinate system of baseline"]
14925    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14926}
14927impl GPS_RTK_DATA {
14928    pub const ENCODED_LEN: usize = 35usize;
14929    pub const DEFAULT: Self = Self {
14930        time_last_baseline_ms: 0_u32,
14931        tow: 0_u32,
14932        baseline_a_mm: 0_i32,
14933        baseline_b_mm: 0_i32,
14934        baseline_c_mm: 0_i32,
14935        accuracy: 0_u32,
14936        iar_num_hypotheses: 0_i32,
14937        wn: 0_u16,
14938        rtk_receiver_id: 0_u8,
14939        rtk_health: 0_u8,
14940        rtk_rate: 0_u8,
14941        nsats: 0_u8,
14942        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14943    };
14944    #[cfg(feature = "arbitrary")]
14945    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14946        use arbitrary::{Arbitrary, Unstructured};
14947        let mut buf = [0u8; 1024];
14948        rng.fill_bytes(&mut buf);
14949        let mut unstructured = Unstructured::new(&buf);
14950        Self::arbitrary(&mut unstructured).unwrap_or_default()
14951    }
14952}
14953impl Default for GPS_RTK_DATA {
14954    fn default() -> Self {
14955        Self::DEFAULT.clone()
14956    }
14957}
14958impl MessageData for GPS_RTK_DATA {
14959    type Message = MavMessage;
14960    const ID: u32 = 127u32;
14961    const NAME: &'static str = "GPS_RTK";
14962    const EXTRA_CRC: u8 = 25u8;
14963    const ENCODED_LEN: usize = 35usize;
14964    fn deser(
14965        _version: MavlinkVersion,
14966        __input: &[u8],
14967    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14968        let avail_len = __input.len();
14969        let mut payload_buf = [0; Self::ENCODED_LEN];
14970        let mut buf = if avail_len < Self::ENCODED_LEN {
14971            payload_buf[0..avail_len].copy_from_slice(__input);
14972            Bytes::new(&payload_buf)
14973        } else {
14974            Bytes::new(__input)
14975        };
14976        let mut __struct = Self::default();
14977        __struct.time_last_baseline_ms = buf.get_u32_le();
14978        __struct.tow = buf.get_u32_le();
14979        __struct.baseline_a_mm = buf.get_i32_le();
14980        __struct.baseline_b_mm = buf.get_i32_le();
14981        __struct.baseline_c_mm = buf.get_i32_le();
14982        __struct.accuracy = buf.get_u32_le();
14983        __struct.iar_num_hypotheses = buf.get_i32_le();
14984        __struct.wn = buf.get_u16_le();
14985        __struct.rtk_receiver_id = buf.get_u8();
14986        __struct.rtk_health = buf.get_u8();
14987        __struct.rtk_rate = buf.get_u8();
14988        __struct.nsats = buf.get_u8();
14989        let tmp = buf.get_u8();
14990        __struct.baseline_coords_type =
14991            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14992                enum_type: "RtkBaselineCoordinateSystem",
14993                value: tmp as u32,
14994            })?;
14995        Ok(__struct)
14996    }
14997    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14998        let mut __tmp = BytesMut::new(bytes);
14999        #[allow(clippy::absurd_extreme_comparisons)]
15000        #[allow(unused_comparisons)]
15001        if __tmp.remaining() < Self::ENCODED_LEN {
15002            panic!(
15003                "buffer is too small (need {} bytes, but got {})",
15004                Self::ENCODED_LEN,
15005                __tmp.remaining(),
15006            )
15007        }
15008        __tmp.put_u32_le(self.time_last_baseline_ms);
15009        __tmp.put_u32_le(self.tow);
15010        __tmp.put_i32_le(self.baseline_a_mm);
15011        __tmp.put_i32_le(self.baseline_b_mm);
15012        __tmp.put_i32_le(self.baseline_c_mm);
15013        __tmp.put_u32_le(self.accuracy);
15014        __tmp.put_i32_le(self.iar_num_hypotheses);
15015        __tmp.put_u16_le(self.wn);
15016        __tmp.put_u8(self.rtk_receiver_id);
15017        __tmp.put_u8(self.rtk_health);
15018        __tmp.put_u8(self.rtk_rate);
15019        __tmp.put_u8(self.nsats);
15020        __tmp.put_u8(self.baseline_coords_type as u8);
15021        if matches!(version, MavlinkVersion::V2) {
15022            let len = __tmp.len();
15023            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15024        } else {
15025            __tmp.len()
15026        }
15027    }
15028}
15029#[doc = "id: 25"]
15030#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
15031#[derive(Debug, Clone, PartialEq)]
15032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15034pub struct GPS_STATUS_DATA {
15035    #[doc = "Number of satellites visible"]
15036    pub satellites_visible: u8,
15037    #[doc = "Global satellite ID"]
15038    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15039    pub satellite_prn: [u8; 20],
15040    #[doc = "0: Satellite not used, 1: used for localization"]
15041    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15042    pub satellite_used: [u8; 20],
15043    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
15044    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15045    pub satellite_elevation: [u8; 20],
15046    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
15047    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15048    pub satellite_azimuth: [u8; 20],
15049    #[doc = "Signal to noise ratio of satellite"]
15050    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15051    pub satellite_snr: [u8; 20],
15052}
15053impl GPS_STATUS_DATA {
15054    pub const ENCODED_LEN: usize = 101usize;
15055    pub const DEFAULT: Self = Self {
15056        satellites_visible: 0_u8,
15057        satellite_prn: [0_u8; 20usize],
15058        satellite_used: [0_u8; 20usize],
15059        satellite_elevation: [0_u8; 20usize],
15060        satellite_azimuth: [0_u8; 20usize],
15061        satellite_snr: [0_u8; 20usize],
15062    };
15063    #[cfg(feature = "arbitrary")]
15064    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15065        use arbitrary::{Arbitrary, Unstructured};
15066        let mut buf = [0u8; 1024];
15067        rng.fill_bytes(&mut buf);
15068        let mut unstructured = Unstructured::new(&buf);
15069        Self::arbitrary(&mut unstructured).unwrap_or_default()
15070    }
15071}
15072impl Default for GPS_STATUS_DATA {
15073    fn default() -> Self {
15074        Self::DEFAULT.clone()
15075    }
15076}
15077impl MessageData for GPS_STATUS_DATA {
15078    type Message = MavMessage;
15079    const ID: u32 = 25u32;
15080    const NAME: &'static str = "GPS_STATUS";
15081    const EXTRA_CRC: u8 = 23u8;
15082    const ENCODED_LEN: usize = 101usize;
15083    fn deser(
15084        _version: MavlinkVersion,
15085        __input: &[u8],
15086    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15087        let avail_len = __input.len();
15088        let mut payload_buf = [0; Self::ENCODED_LEN];
15089        let mut buf = if avail_len < Self::ENCODED_LEN {
15090            payload_buf[0..avail_len].copy_from_slice(__input);
15091            Bytes::new(&payload_buf)
15092        } else {
15093            Bytes::new(__input)
15094        };
15095        let mut __struct = Self::default();
15096        __struct.satellites_visible = buf.get_u8();
15097        for v in &mut __struct.satellite_prn {
15098            let val = buf.get_u8();
15099            *v = val;
15100        }
15101        for v in &mut __struct.satellite_used {
15102            let val = buf.get_u8();
15103            *v = val;
15104        }
15105        for v in &mut __struct.satellite_elevation {
15106            let val = buf.get_u8();
15107            *v = val;
15108        }
15109        for v in &mut __struct.satellite_azimuth {
15110            let val = buf.get_u8();
15111            *v = val;
15112        }
15113        for v in &mut __struct.satellite_snr {
15114            let val = buf.get_u8();
15115            *v = val;
15116        }
15117        Ok(__struct)
15118    }
15119    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15120        let mut __tmp = BytesMut::new(bytes);
15121        #[allow(clippy::absurd_extreme_comparisons)]
15122        #[allow(unused_comparisons)]
15123        if __tmp.remaining() < Self::ENCODED_LEN {
15124            panic!(
15125                "buffer is too small (need {} bytes, but got {})",
15126                Self::ENCODED_LEN,
15127                __tmp.remaining(),
15128            )
15129        }
15130        __tmp.put_u8(self.satellites_visible);
15131        for val in &self.satellite_prn {
15132            __tmp.put_u8(*val);
15133        }
15134        for val in &self.satellite_used {
15135            __tmp.put_u8(*val);
15136        }
15137        for val in &self.satellite_elevation {
15138            __tmp.put_u8(*val);
15139        }
15140        for val in &self.satellite_azimuth {
15141            __tmp.put_u8(*val);
15142        }
15143        for val in &self.satellite_snr {
15144            __tmp.put_u8(*val);
15145        }
15146        if matches!(version, MavlinkVersion::V2) {
15147            let len = __tmp.len();
15148            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15149        } else {
15150            __tmp.len()
15151        }
15152    }
15153}
15154#[doc = "id: 0"]
15155#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
15156#[derive(Debug, Clone, PartialEq)]
15157#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15159pub struct HEARTBEAT_DATA {
15160    #[doc = "A bitfield for use for autopilot-specific flags"]
15161    pub custom_mode: u32,
15162    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
15163    pub mavtype: MavType,
15164    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15165    pub autopilot: MavAutopilot,
15166    #[doc = "System mode bitmap."]
15167    pub base_mode: MavModeFlag,
15168    #[doc = "System status flag."]
15169    pub system_status: MavState,
15170    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
15171    pub mavlink_version: u8,
15172}
15173impl HEARTBEAT_DATA {
15174    pub const ENCODED_LEN: usize = 9usize;
15175    pub const DEFAULT: Self = Self {
15176        custom_mode: 0_u32,
15177        mavtype: MavType::DEFAULT,
15178        autopilot: MavAutopilot::DEFAULT,
15179        base_mode: MavModeFlag::DEFAULT,
15180        system_status: MavState::DEFAULT,
15181        mavlink_version: MINOR_MAVLINK_VERSION,
15182    };
15183    #[cfg(feature = "arbitrary")]
15184    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15185        use arbitrary::{Arbitrary, Unstructured};
15186        let mut buf = [0u8; 1024];
15187        rng.fill_bytes(&mut buf);
15188        let mut unstructured = Unstructured::new(&buf);
15189        Self::arbitrary(&mut unstructured).unwrap_or_default()
15190    }
15191}
15192impl Default for HEARTBEAT_DATA {
15193    fn default() -> Self {
15194        Self::DEFAULT.clone()
15195    }
15196}
15197impl MessageData for HEARTBEAT_DATA {
15198    type Message = MavMessage;
15199    const ID: u32 = 0u32;
15200    const NAME: &'static str = "HEARTBEAT";
15201    const EXTRA_CRC: u8 = 50u8;
15202    const ENCODED_LEN: usize = 9usize;
15203    fn deser(
15204        _version: MavlinkVersion,
15205        __input: &[u8],
15206    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15207        let avail_len = __input.len();
15208        let mut payload_buf = [0; Self::ENCODED_LEN];
15209        let mut buf = if avail_len < Self::ENCODED_LEN {
15210            payload_buf[0..avail_len].copy_from_slice(__input);
15211            Bytes::new(&payload_buf)
15212        } else {
15213            Bytes::new(__input)
15214        };
15215        let mut __struct = Self::default();
15216        __struct.custom_mode = buf.get_u32_le();
15217        let tmp = buf.get_u8();
15218        __struct.mavtype =
15219            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15220                enum_type: "MavType",
15221                value: tmp as u32,
15222            })?;
15223        let tmp = buf.get_u8();
15224        __struct.autopilot =
15225            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15226                enum_type: "MavAutopilot",
15227                value: tmp as u32,
15228            })?;
15229        let tmp = buf.get_u8();
15230        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15231            ::mavlink_core::error::ParserError::InvalidFlag {
15232                flag_type: "MavModeFlag",
15233                value: tmp as u32,
15234            },
15235        )?;
15236        let tmp = buf.get_u8();
15237        __struct.system_status =
15238            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15239                enum_type: "MavState",
15240                value: tmp as u32,
15241            })?;
15242        __struct.mavlink_version = buf.get_u8();
15243        Ok(__struct)
15244    }
15245    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15246        let mut __tmp = BytesMut::new(bytes);
15247        #[allow(clippy::absurd_extreme_comparisons)]
15248        #[allow(unused_comparisons)]
15249        if __tmp.remaining() < Self::ENCODED_LEN {
15250            panic!(
15251                "buffer is too small (need {} bytes, but got {})",
15252                Self::ENCODED_LEN,
15253                __tmp.remaining(),
15254            )
15255        }
15256        __tmp.put_u32_le(self.custom_mode);
15257        __tmp.put_u8(self.mavtype as u8);
15258        __tmp.put_u8(self.autopilot as u8);
15259        __tmp.put_u8(self.base_mode.bits());
15260        __tmp.put_u8(self.system_status as u8);
15261        __tmp.put_u8(self.mavlink_version);
15262        if matches!(version, MavlinkVersion::V2) {
15263            let len = __tmp.len();
15264            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15265        } else {
15266            __tmp.len()
15267        }
15268    }
15269}
15270#[doc = "id: 105"]
15271#[doc = "The IMU readings in SI units in NED body frame."]
15272#[derive(Debug, Clone, PartialEq)]
15273#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15274#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15275pub struct HIGHRES_IMU_DATA {
15276    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15277    pub time_usec: u64,
15278    #[doc = "X acceleration"]
15279    pub xacc: f32,
15280    #[doc = "Y acceleration"]
15281    pub yacc: f32,
15282    #[doc = "Z acceleration"]
15283    pub zacc: f32,
15284    #[doc = "Angular speed around X axis"]
15285    pub xgyro: f32,
15286    #[doc = "Angular speed around Y axis"]
15287    pub ygyro: f32,
15288    #[doc = "Angular speed around Z axis"]
15289    pub zgyro: f32,
15290    #[doc = "X Magnetic field"]
15291    pub xmag: f32,
15292    #[doc = "Y Magnetic field"]
15293    pub ymag: f32,
15294    #[doc = "Z Magnetic field"]
15295    pub zmag: f32,
15296    #[doc = "Absolute pressure"]
15297    pub abs_pressure: f32,
15298    #[doc = "Differential pressure"]
15299    pub diff_pressure: f32,
15300    #[doc = "Altitude calculated from pressure"]
15301    pub pressure_alt: f32,
15302    #[doc = "Temperature"]
15303    pub temperature: f32,
15304    #[doc = "Bitmap for fields that have updated since last message"]
15305    pub fields_updated: HighresImuUpdatedFlags,
15306    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15307    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15308    pub id: u8,
15309}
15310impl HIGHRES_IMU_DATA {
15311    pub const ENCODED_LEN: usize = 63usize;
15312    pub const DEFAULT: Self = Self {
15313        time_usec: 0_u64,
15314        xacc: 0.0_f32,
15315        yacc: 0.0_f32,
15316        zacc: 0.0_f32,
15317        xgyro: 0.0_f32,
15318        ygyro: 0.0_f32,
15319        zgyro: 0.0_f32,
15320        xmag: 0.0_f32,
15321        ymag: 0.0_f32,
15322        zmag: 0.0_f32,
15323        abs_pressure: 0.0_f32,
15324        diff_pressure: 0.0_f32,
15325        pressure_alt: 0.0_f32,
15326        temperature: 0.0_f32,
15327        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15328        id: 0_u8,
15329    };
15330    #[cfg(feature = "arbitrary")]
15331    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15332        use arbitrary::{Arbitrary, Unstructured};
15333        let mut buf = [0u8; 1024];
15334        rng.fill_bytes(&mut buf);
15335        let mut unstructured = Unstructured::new(&buf);
15336        Self::arbitrary(&mut unstructured).unwrap_or_default()
15337    }
15338}
15339impl Default for HIGHRES_IMU_DATA {
15340    fn default() -> Self {
15341        Self::DEFAULT.clone()
15342    }
15343}
15344impl MessageData for HIGHRES_IMU_DATA {
15345    type Message = MavMessage;
15346    const ID: u32 = 105u32;
15347    const NAME: &'static str = "HIGHRES_IMU";
15348    const EXTRA_CRC: u8 = 93u8;
15349    const ENCODED_LEN: usize = 63usize;
15350    fn deser(
15351        _version: MavlinkVersion,
15352        __input: &[u8],
15353    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15354        let avail_len = __input.len();
15355        let mut payload_buf = [0; Self::ENCODED_LEN];
15356        let mut buf = if avail_len < Self::ENCODED_LEN {
15357            payload_buf[0..avail_len].copy_from_slice(__input);
15358            Bytes::new(&payload_buf)
15359        } else {
15360            Bytes::new(__input)
15361        };
15362        let mut __struct = Self::default();
15363        __struct.time_usec = buf.get_u64_le();
15364        __struct.xacc = buf.get_f32_le();
15365        __struct.yacc = buf.get_f32_le();
15366        __struct.zacc = buf.get_f32_le();
15367        __struct.xgyro = buf.get_f32_le();
15368        __struct.ygyro = buf.get_f32_le();
15369        __struct.zgyro = buf.get_f32_le();
15370        __struct.xmag = buf.get_f32_le();
15371        __struct.ymag = buf.get_f32_le();
15372        __struct.zmag = buf.get_f32_le();
15373        __struct.abs_pressure = buf.get_f32_le();
15374        __struct.diff_pressure = buf.get_f32_le();
15375        __struct.pressure_alt = buf.get_f32_le();
15376        __struct.temperature = buf.get_f32_le();
15377        let tmp = buf.get_u16_le();
15378        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
15379            tmp & HighresImuUpdatedFlags::all().bits(),
15380        )
15381        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15382            flag_type: "HighresImuUpdatedFlags",
15383            value: tmp as u32,
15384        })?;
15385        __struct.id = buf.get_u8();
15386        Ok(__struct)
15387    }
15388    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15389        let mut __tmp = BytesMut::new(bytes);
15390        #[allow(clippy::absurd_extreme_comparisons)]
15391        #[allow(unused_comparisons)]
15392        if __tmp.remaining() < Self::ENCODED_LEN {
15393            panic!(
15394                "buffer is too small (need {} bytes, but got {})",
15395                Self::ENCODED_LEN,
15396                __tmp.remaining(),
15397            )
15398        }
15399        __tmp.put_u64_le(self.time_usec);
15400        __tmp.put_f32_le(self.xacc);
15401        __tmp.put_f32_le(self.yacc);
15402        __tmp.put_f32_le(self.zacc);
15403        __tmp.put_f32_le(self.xgyro);
15404        __tmp.put_f32_le(self.ygyro);
15405        __tmp.put_f32_le(self.zgyro);
15406        __tmp.put_f32_le(self.xmag);
15407        __tmp.put_f32_le(self.ymag);
15408        __tmp.put_f32_le(self.zmag);
15409        __tmp.put_f32_le(self.abs_pressure);
15410        __tmp.put_f32_le(self.diff_pressure);
15411        __tmp.put_f32_le(self.pressure_alt);
15412        __tmp.put_f32_le(self.temperature);
15413        __tmp.put_u16_le(self.fields_updated.bits());
15414        __tmp.put_u8(self.id);
15415        if matches!(version, MavlinkVersion::V2) {
15416            let len = __tmp.len();
15417            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15418        } else {
15419            __tmp.len()
15420        }
15421    }
15422}
15423#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15424#[doc = "id: 234"]
15425#[doc = "Message appropriate for high latency connections like Iridium."]
15426#[derive(Debug, Clone, PartialEq)]
15427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15429pub struct HIGH_LATENCY_DATA {
15430    #[doc = "A bitfield for use for autopilot-specific flags."]
15431    pub custom_mode: u32,
15432    #[doc = "Latitude"]
15433    pub latitude: i32,
15434    #[doc = "Longitude"]
15435    pub longitude: i32,
15436    #[doc = "roll"]
15437    pub roll: i16,
15438    #[doc = "pitch"]
15439    pub pitch: i16,
15440    #[doc = "heading"]
15441    pub heading: u16,
15442    #[doc = "heading setpoint"]
15443    pub heading_sp: i16,
15444    #[doc = "Altitude above mean sea level"]
15445    pub altitude_amsl: i16,
15446    #[doc = "Altitude setpoint relative to the home position"]
15447    pub altitude_sp: i16,
15448    #[doc = "distance to target"]
15449    pub wp_distance: u16,
15450    #[doc = "Bitmap of enabled system modes."]
15451    pub base_mode: MavModeFlag,
15452    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15453    pub landed_state: MavLandedState,
15454    #[doc = "throttle (percentage)"]
15455    pub throttle: i8,
15456    #[doc = "airspeed"]
15457    pub airspeed: u8,
15458    #[doc = "airspeed setpoint"]
15459    pub airspeed_sp: u8,
15460    #[doc = "groundspeed"]
15461    pub groundspeed: u8,
15462    #[doc = "climb rate"]
15463    pub climb_rate: i8,
15464    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15465    pub gps_nsat: u8,
15466    #[doc = "GPS Fix type."]
15467    pub gps_fix_type: GpsFixType,
15468    #[doc = "Remaining battery (percentage)"]
15469    pub battery_remaining: u8,
15470    #[doc = "Autopilot temperature (degrees C)"]
15471    pub temperature: i8,
15472    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15473    pub temperature_air: i8,
15474    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15475    pub failsafe: u8,
15476    #[doc = "current waypoint number"]
15477    pub wp_num: u8,
15478}
15479impl HIGH_LATENCY_DATA {
15480    pub const ENCODED_LEN: usize = 40usize;
15481    pub const DEFAULT: Self = Self {
15482        custom_mode: 0_u32,
15483        latitude: 0_i32,
15484        longitude: 0_i32,
15485        roll: 0_i16,
15486        pitch: 0_i16,
15487        heading: 0_u16,
15488        heading_sp: 0_i16,
15489        altitude_amsl: 0_i16,
15490        altitude_sp: 0_i16,
15491        wp_distance: 0_u16,
15492        base_mode: MavModeFlag::DEFAULT,
15493        landed_state: MavLandedState::DEFAULT,
15494        throttle: 0_i8,
15495        airspeed: 0_u8,
15496        airspeed_sp: 0_u8,
15497        groundspeed: 0_u8,
15498        climb_rate: 0_i8,
15499        gps_nsat: 0_u8,
15500        gps_fix_type: GpsFixType::DEFAULT,
15501        battery_remaining: 0_u8,
15502        temperature: 0_i8,
15503        temperature_air: 0_i8,
15504        failsafe: 0_u8,
15505        wp_num: 0_u8,
15506    };
15507    #[cfg(feature = "arbitrary")]
15508    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15509        use arbitrary::{Arbitrary, Unstructured};
15510        let mut buf = [0u8; 1024];
15511        rng.fill_bytes(&mut buf);
15512        let mut unstructured = Unstructured::new(&buf);
15513        Self::arbitrary(&mut unstructured).unwrap_or_default()
15514    }
15515}
15516impl Default for HIGH_LATENCY_DATA {
15517    fn default() -> Self {
15518        Self::DEFAULT.clone()
15519    }
15520}
15521impl MessageData for HIGH_LATENCY_DATA {
15522    type Message = MavMessage;
15523    const ID: u32 = 234u32;
15524    const NAME: &'static str = "HIGH_LATENCY";
15525    const EXTRA_CRC: u8 = 150u8;
15526    const ENCODED_LEN: usize = 40usize;
15527    fn deser(
15528        _version: MavlinkVersion,
15529        __input: &[u8],
15530    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15531        let avail_len = __input.len();
15532        let mut payload_buf = [0; Self::ENCODED_LEN];
15533        let mut buf = if avail_len < Self::ENCODED_LEN {
15534            payload_buf[0..avail_len].copy_from_slice(__input);
15535            Bytes::new(&payload_buf)
15536        } else {
15537            Bytes::new(__input)
15538        };
15539        let mut __struct = Self::default();
15540        __struct.custom_mode = buf.get_u32_le();
15541        __struct.latitude = buf.get_i32_le();
15542        __struct.longitude = buf.get_i32_le();
15543        __struct.roll = buf.get_i16_le();
15544        __struct.pitch = buf.get_i16_le();
15545        __struct.heading = buf.get_u16_le();
15546        __struct.heading_sp = buf.get_i16_le();
15547        __struct.altitude_amsl = buf.get_i16_le();
15548        __struct.altitude_sp = buf.get_i16_le();
15549        __struct.wp_distance = buf.get_u16_le();
15550        let tmp = buf.get_u8();
15551        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15552            ::mavlink_core::error::ParserError::InvalidFlag {
15553                flag_type: "MavModeFlag",
15554                value: tmp as u32,
15555            },
15556        )?;
15557        let tmp = buf.get_u8();
15558        __struct.landed_state =
15559            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15560                enum_type: "MavLandedState",
15561                value: tmp as u32,
15562            })?;
15563        __struct.throttle = buf.get_i8();
15564        __struct.airspeed = buf.get_u8();
15565        __struct.airspeed_sp = buf.get_u8();
15566        __struct.groundspeed = buf.get_u8();
15567        __struct.climb_rate = buf.get_i8();
15568        __struct.gps_nsat = buf.get_u8();
15569        let tmp = buf.get_u8();
15570        __struct.gps_fix_type =
15571            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15572                enum_type: "GpsFixType",
15573                value: tmp as u32,
15574            })?;
15575        __struct.battery_remaining = buf.get_u8();
15576        __struct.temperature = buf.get_i8();
15577        __struct.temperature_air = buf.get_i8();
15578        __struct.failsafe = buf.get_u8();
15579        __struct.wp_num = buf.get_u8();
15580        Ok(__struct)
15581    }
15582    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15583        let mut __tmp = BytesMut::new(bytes);
15584        #[allow(clippy::absurd_extreme_comparisons)]
15585        #[allow(unused_comparisons)]
15586        if __tmp.remaining() < Self::ENCODED_LEN {
15587            panic!(
15588                "buffer is too small (need {} bytes, but got {})",
15589                Self::ENCODED_LEN,
15590                __tmp.remaining(),
15591            )
15592        }
15593        __tmp.put_u32_le(self.custom_mode);
15594        __tmp.put_i32_le(self.latitude);
15595        __tmp.put_i32_le(self.longitude);
15596        __tmp.put_i16_le(self.roll);
15597        __tmp.put_i16_le(self.pitch);
15598        __tmp.put_u16_le(self.heading);
15599        __tmp.put_i16_le(self.heading_sp);
15600        __tmp.put_i16_le(self.altitude_amsl);
15601        __tmp.put_i16_le(self.altitude_sp);
15602        __tmp.put_u16_le(self.wp_distance);
15603        __tmp.put_u8(self.base_mode.bits());
15604        __tmp.put_u8(self.landed_state as u8);
15605        __tmp.put_i8(self.throttle);
15606        __tmp.put_u8(self.airspeed);
15607        __tmp.put_u8(self.airspeed_sp);
15608        __tmp.put_u8(self.groundspeed);
15609        __tmp.put_i8(self.climb_rate);
15610        __tmp.put_u8(self.gps_nsat);
15611        __tmp.put_u8(self.gps_fix_type as u8);
15612        __tmp.put_u8(self.battery_remaining);
15613        __tmp.put_i8(self.temperature);
15614        __tmp.put_i8(self.temperature_air);
15615        __tmp.put_u8(self.failsafe);
15616        __tmp.put_u8(self.wp_num);
15617        if matches!(version, MavlinkVersion::V2) {
15618            let len = __tmp.len();
15619            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15620        } else {
15621            __tmp.len()
15622        }
15623    }
15624}
15625#[doc = "id: 235"]
15626#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15627#[derive(Debug, Clone, PartialEq)]
15628#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15629#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15630pub struct HIGH_LATENCY2_DATA {
15631    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15632    pub timestamp: u32,
15633    #[doc = "Latitude"]
15634    pub latitude: i32,
15635    #[doc = "Longitude"]
15636    pub longitude: i32,
15637    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15638    pub custom_mode: u16,
15639    #[doc = "Altitude above mean sea level"]
15640    pub altitude: i16,
15641    #[doc = "Altitude setpoint"]
15642    pub target_altitude: i16,
15643    #[doc = "Distance to target waypoint or position"]
15644    pub target_distance: u16,
15645    #[doc = "Current waypoint number"]
15646    pub wp_num: u16,
15647    #[doc = "Bitmap of failure flags."]
15648    pub failure_flags: HlFailureFlag,
15649    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15650    pub mavtype: MavType,
15651    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15652    pub autopilot: MavAutopilot,
15653    #[doc = "Heading"]
15654    pub heading: u8,
15655    #[doc = "Heading setpoint"]
15656    pub target_heading: u8,
15657    #[doc = "Throttle"]
15658    pub throttle: u8,
15659    #[doc = "Airspeed"]
15660    pub airspeed: u8,
15661    #[doc = "Airspeed setpoint"]
15662    pub airspeed_sp: u8,
15663    #[doc = "Groundspeed"]
15664    pub groundspeed: u8,
15665    #[doc = "Windspeed"]
15666    pub windspeed: u8,
15667    #[doc = "Wind heading"]
15668    pub wind_heading: u8,
15669    #[doc = "Maximum error horizontal position since last message"]
15670    pub eph: u8,
15671    #[doc = "Maximum error vertical position since last message"]
15672    pub epv: u8,
15673    #[doc = "Air temperature"]
15674    pub temperature_air: i8,
15675    #[doc = "Maximum climb rate magnitude since last message"]
15676    pub climb_rate: i8,
15677    #[doc = "Battery level (-1 if field not provided)."]
15678    pub battery: i8,
15679    #[doc = "Field for custom payload."]
15680    pub custom0: i8,
15681    #[doc = "Field for custom payload."]
15682    pub custom1: i8,
15683    #[doc = "Field for custom payload."]
15684    pub custom2: i8,
15685}
15686impl HIGH_LATENCY2_DATA {
15687    pub const ENCODED_LEN: usize = 42usize;
15688    pub const DEFAULT: Self = Self {
15689        timestamp: 0_u32,
15690        latitude: 0_i32,
15691        longitude: 0_i32,
15692        custom_mode: 0_u16,
15693        altitude: 0_i16,
15694        target_altitude: 0_i16,
15695        target_distance: 0_u16,
15696        wp_num: 0_u16,
15697        failure_flags: HlFailureFlag::DEFAULT,
15698        mavtype: MavType::DEFAULT,
15699        autopilot: MavAutopilot::DEFAULT,
15700        heading: 0_u8,
15701        target_heading: 0_u8,
15702        throttle: 0_u8,
15703        airspeed: 0_u8,
15704        airspeed_sp: 0_u8,
15705        groundspeed: 0_u8,
15706        windspeed: 0_u8,
15707        wind_heading: 0_u8,
15708        eph: 0_u8,
15709        epv: 0_u8,
15710        temperature_air: 0_i8,
15711        climb_rate: 0_i8,
15712        battery: 0_i8,
15713        custom0: 0_i8,
15714        custom1: 0_i8,
15715        custom2: 0_i8,
15716    };
15717    #[cfg(feature = "arbitrary")]
15718    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15719        use arbitrary::{Arbitrary, Unstructured};
15720        let mut buf = [0u8; 1024];
15721        rng.fill_bytes(&mut buf);
15722        let mut unstructured = Unstructured::new(&buf);
15723        Self::arbitrary(&mut unstructured).unwrap_or_default()
15724    }
15725}
15726impl Default for HIGH_LATENCY2_DATA {
15727    fn default() -> Self {
15728        Self::DEFAULT.clone()
15729    }
15730}
15731impl MessageData for HIGH_LATENCY2_DATA {
15732    type Message = MavMessage;
15733    const ID: u32 = 235u32;
15734    const NAME: &'static str = "HIGH_LATENCY2";
15735    const EXTRA_CRC: u8 = 179u8;
15736    const ENCODED_LEN: usize = 42usize;
15737    fn deser(
15738        _version: MavlinkVersion,
15739        __input: &[u8],
15740    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15741        let avail_len = __input.len();
15742        let mut payload_buf = [0; Self::ENCODED_LEN];
15743        let mut buf = if avail_len < Self::ENCODED_LEN {
15744            payload_buf[0..avail_len].copy_from_slice(__input);
15745            Bytes::new(&payload_buf)
15746        } else {
15747            Bytes::new(__input)
15748        };
15749        let mut __struct = Self::default();
15750        __struct.timestamp = buf.get_u32_le();
15751        __struct.latitude = buf.get_i32_le();
15752        __struct.longitude = buf.get_i32_le();
15753        __struct.custom_mode = buf.get_u16_le();
15754        __struct.altitude = buf.get_i16_le();
15755        __struct.target_altitude = buf.get_i16_le();
15756        __struct.target_distance = buf.get_u16_le();
15757        __struct.wp_num = buf.get_u16_le();
15758        let tmp = buf.get_u16_le();
15759        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
15760            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15761                flag_type: "HlFailureFlag",
15762                value: tmp as u32,
15763            })?;
15764        let tmp = buf.get_u8();
15765        __struct.mavtype =
15766            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15767                enum_type: "MavType",
15768                value: tmp as u32,
15769            })?;
15770        let tmp = buf.get_u8();
15771        __struct.autopilot =
15772            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15773                enum_type: "MavAutopilot",
15774                value: tmp as u32,
15775            })?;
15776        __struct.heading = buf.get_u8();
15777        __struct.target_heading = buf.get_u8();
15778        __struct.throttle = buf.get_u8();
15779        __struct.airspeed = buf.get_u8();
15780        __struct.airspeed_sp = buf.get_u8();
15781        __struct.groundspeed = buf.get_u8();
15782        __struct.windspeed = buf.get_u8();
15783        __struct.wind_heading = buf.get_u8();
15784        __struct.eph = buf.get_u8();
15785        __struct.epv = buf.get_u8();
15786        __struct.temperature_air = buf.get_i8();
15787        __struct.climb_rate = buf.get_i8();
15788        __struct.battery = buf.get_i8();
15789        __struct.custom0 = buf.get_i8();
15790        __struct.custom1 = buf.get_i8();
15791        __struct.custom2 = buf.get_i8();
15792        Ok(__struct)
15793    }
15794    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15795        let mut __tmp = BytesMut::new(bytes);
15796        #[allow(clippy::absurd_extreme_comparisons)]
15797        #[allow(unused_comparisons)]
15798        if __tmp.remaining() < Self::ENCODED_LEN {
15799            panic!(
15800                "buffer is too small (need {} bytes, but got {})",
15801                Self::ENCODED_LEN,
15802                __tmp.remaining(),
15803            )
15804        }
15805        __tmp.put_u32_le(self.timestamp);
15806        __tmp.put_i32_le(self.latitude);
15807        __tmp.put_i32_le(self.longitude);
15808        __tmp.put_u16_le(self.custom_mode);
15809        __tmp.put_i16_le(self.altitude);
15810        __tmp.put_i16_le(self.target_altitude);
15811        __tmp.put_u16_le(self.target_distance);
15812        __tmp.put_u16_le(self.wp_num);
15813        __tmp.put_u16_le(self.failure_flags.bits());
15814        __tmp.put_u8(self.mavtype as u8);
15815        __tmp.put_u8(self.autopilot as u8);
15816        __tmp.put_u8(self.heading);
15817        __tmp.put_u8(self.target_heading);
15818        __tmp.put_u8(self.throttle);
15819        __tmp.put_u8(self.airspeed);
15820        __tmp.put_u8(self.airspeed_sp);
15821        __tmp.put_u8(self.groundspeed);
15822        __tmp.put_u8(self.windspeed);
15823        __tmp.put_u8(self.wind_heading);
15824        __tmp.put_u8(self.eph);
15825        __tmp.put_u8(self.epv);
15826        __tmp.put_i8(self.temperature_air);
15827        __tmp.put_i8(self.climb_rate);
15828        __tmp.put_i8(self.battery);
15829        __tmp.put_i8(self.custom0);
15830        __tmp.put_i8(self.custom1);
15831        __tmp.put_i8(self.custom2);
15832        if matches!(version, MavlinkVersion::V2) {
15833            let len = __tmp.len();
15834            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15835        } else {
15836            __tmp.len()
15837        }
15838    }
15839}
15840#[doc = "id: 93"]
15841#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15842#[derive(Debug, Clone, PartialEq)]
15843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15844#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15845pub struct HIL_ACTUATOR_CONTROLS_DATA {
15846    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15847    pub time_usec: u64,
15848    #[doc = "Flags bitmask."]
15849    pub flags: HilActuatorControlsFlags,
15850    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
15851    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15852    pub controls: [f32; 16],
15853    #[doc = "System mode. Includes arming state."]
15854    pub mode: MavModeFlag,
15855}
15856impl HIL_ACTUATOR_CONTROLS_DATA {
15857    pub const ENCODED_LEN: usize = 81usize;
15858    pub const DEFAULT: Self = Self {
15859        time_usec: 0_u64,
15860        flags: HilActuatorControlsFlags::DEFAULT,
15861        controls: [0.0_f32; 16usize],
15862        mode: MavModeFlag::DEFAULT,
15863    };
15864    #[cfg(feature = "arbitrary")]
15865    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15866        use arbitrary::{Arbitrary, Unstructured};
15867        let mut buf = [0u8; 1024];
15868        rng.fill_bytes(&mut buf);
15869        let mut unstructured = Unstructured::new(&buf);
15870        Self::arbitrary(&mut unstructured).unwrap_or_default()
15871    }
15872}
15873impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15874    fn default() -> Self {
15875        Self::DEFAULT.clone()
15876    }
15877}
15878impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15879    type Message = MavMessage;
15880    const ID: u32 = 93u32;
15881    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15882    const EXTRA_CRC: u8 = 47u8;
15883    const ENCODED_LEN: usize = 81usize;
15884    fn deser(
15885        _version: MavlinkVersion,
15886        __input: &[u8],
15887    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15888        let avail_len = __input.len();
15889        let mut payload_buf = [0; Self::ENCODED_LEN];
15890        let mut buf = if avail_len < Self::ENCODED_LEN {
15891            payload_buf[0..avail_len].copy_from_slice(__input);
15892            Bytes::new(&payload_buf)
15893        } else {
15894            Bytes::new(__input)
15895        };
15896        let mut __struct = Self::default();
15897        __struct.time_usec = buf.get_u64_le();
15898        let tmp = buf.get_u64_le();
15899        __struct.flags =
15900            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
15901                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15902                    flag_type: "HilActuatorControlsFlags",
15903                    value: tmp as u32,
15904                })?;
15905        for v in &mut __struct.controls {
15906            let val = buf.get_f32_le();
15907            *v = val;
15908        }
15909        let tmp = buf.get_u8();
15910        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15911            ::mavlink_core::error::ParserError::InvalidFlag {
15912                flag_type: "MavModeFlag",
15913                value: tmp as u32,
15914            },
15915        )?;
15916        Ok(__struct)
15917    }
15918    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15919        let mut __tmp = BytesMut::new(bytes);
15920        #[allow(clippy::absurd_extreme_comparisons)]
15921        #[allow(unused_comparisons)]
15922        if __tmp.remaining() < Self::ENCODED_LEN {
15923            panic!(
15924                "buffer is too small (need {} bytes, but got {})",
15925                Self::ENCODED_LEN,
15926                __tmp.remaining(),
15927            )
15928        }
15929        __tmp.put_u64_le(self.time_usec);
15930        __tmp.put_u64_le(self.flags.bits());
15931        for val in &self.controls {
15932            __tmp.put_f32_le(*val);
15933        }
15934        __tmp.put_u8(self.mode.bits());
15935        if matches!(version, MavlinkVersion::V2) {
15936            let len = __tmp.len();
15937            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15938        } else {
15939            __tmp.len()
15940        }
15941    }
15942}
15943#[doc = "id: 91"]
15944#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
15945#[derive(Debug, Clone, PartialEq)]
15946#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15947#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15948pub struct HIL_CONTROLS_DATA {
15949    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15950    pub time_usec: u64,
15951    #[doc = "Control output -1 .. 1"]
15952    pub roll_ailerons: f32,
15953    #[doc = "Control output -1 .. 1"]
15954    pub pitch_elevator: f32,
15955    #[doc = "Control output -1 .. 1"]
15956    pub yaw_rudder: f32,
15957    #[doc = "Throttle 0 .. 1"]
15958    pub throttle: f32,
15959    #[doc = "Aux 1, -1 .. 1"]
15960    pub aux1: f32,
15961    #[doc = "Aux 2, -1 .. 1"]
15962    pub aux2: f32,
15963    #[doc = "Aux 3, -1 .. 1"]
15964    pub aux3: f32,
15965    #[doc = "Aux 4, -1 .. 1"]
15966    pub aux4: f32,
15967    #[doc = "System mode."]
15968    pub mode: MavMode,
15969    #[doc = "Navigation mode (MAV_NAV_MODE)"]
15970    pub nav_mode: u8,
15971}
15972impl HIL_CONTROLS_DATA {
15973    pub const ENCODED_LEN: usize = 42usize;
15974    pub const DEFAULT: Self = Self {
15975        time_usec: 0_u64,
15976        roll_ailerons: 0.0_f32,
15977        pitch_elevator: 0.0_f32,
15978        yaw_rudder: 0.0_f32,
15979        throttle: 0.0_f32,
15980        aux1: 0.0_f32,
15981        aux2: 0.0_f32,
15982        aux3: 0.0_f32,
15983        aux4: 0.0_f32,
15984        mode: MavMode::DEFAULT,
15985        nav_mode: 0_u8,
15986    };
15987    #[cfg(feature = "arbitrary")]
15988    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15989        use arbitrary::{Arbitrary, Unstructured};
15990        let mut buf = [0u8; 1024];
15991        rng.fill_bytes(&mut buf);
15992        let mut unstructured = Unstructured::new(&buf);
15993        Self::arbitrary(&mut unstructured).unwrap_or_default()
15994    }
15995}
15996impl Default for HIL_CONTROLS_DATA {
15997    fn default() -> Self {
15998        Self::DEFAULT.clone()
15999    }
16000}
16001impl MessageData for HIL_CONTROLS_DATA {
16002    type Message = MavMessage;
16003    const ID: u32 = 91u32;
16004    const NAME: &'static str = "HIL_CONTROLS";
16005    const EXTRA_CRC: u8 = 63u8;
16006    const ENCODED_LEN: usize = 42usize;
16007    fn deser(
16008        _version: MavlinkVersion,
16009        __input: &[u8],
16010    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16011        let avail_len = __input.len();
16012        let mut payload_buf = [0; Self::ENCODED_LEN];
16013        let mut buf = if avail_len < Self::ENCODED_LEN {
16014            payload_buf[0..avail_len].copy_from_slice(__input);
16015            Bytes::new(&payload_buf)
16016        } else {
16017            Bytes::new(__input)
16018        };
16019        let mut __struct = Self::default();
16020        __struct.time_usec = buf.get_u64_le();
16021        __struct.roll_ailerons = buf.get_f32_le();
16022        __struct.pitch_elevator = buf.get_f32_le();
16023        __struct.yaw_rudder = buf.get_f32_le();
16024        __struct.throttle = buf.get_f32_le();
16025        __struct.aux1 = buf.get_f32_le();
16026        __struct.aux2 = buf.get_f32_le();
16027        __struct.aux3 = buf.get_f32_le();
16028        __struct.aux4 = buf.get_f32_le();
16029        let tmp = buf.get_u8();
16030        __struct.mode =
16031            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16032                enum_type: "MavMode",
16033                value: tmp as u32,
16034            })?;
16035        __struct.nav_mode = buf.get_u8();
16036        Ok(__struct)
16037    }
16038    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16039        let mut __tmp = BytesMut::new(bytes);
16040        #[allow(clippy::absurd_extreme_comparisons)]
16041        #[allow(unused_comparisons)]
16042        if __tmp.remaining() < Self::ENCODED_LEN {
16043            panic!(
16044                "buffer is too small (need {} bytes, but got {})",
16045                Self::ENCODED_LEN,
16046                __tmp.remaining(),
16047            )
16048        }
16049        __tmp.put_u64_le(self.time_usec);
16050        __tmp.put_f32_le(self.roll_ailerons);
16051        __tmp.put_f32_le(self.pitch_elevator);
16052        __tmp.put_f32_le(self.yaw_rudder);
16053        __tmp.put_f32_le(self.throttle);
16054        __tmp.put_f32_le(self.aux1);
16055        __tmp.put_f32_le(self.aux2);
16056        __tmp.put_f32_le(self.aux3);
16057        __tmp.put_f32_le(self.aux4);
16058        __tmp.put_u8(self.mode as u8);
16059        __tmp.put_u8(self.nav_mode);
16060        if matches!(version, MavlinkVersion::V2) {
16061            let len = __tmp.len();
16062            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16063        } else {
16064            __tmp.len()
16065        }
16066    }
16067}
16068#[doc = "id: 113"]
16069#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16070#[derive(Debug, Clone, PartialEq)]
16071#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16072#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16073pub struct HIL_GPS_DATA {
16074    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16075    pub time_usec: u64,
16076    #[doc = "Latitude (WGS84)"]
16077    pub lat: i32,
16078    #[doc = "Longitude (WGS84)"]
16079    pub lon: i32,
16080    #[doc = "Altitude (MSL). Positive for up."]
16081    pub alt: i32,
16082    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16083    pub eph: u16,
16084    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16085    pub epv: u16,
16086    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16087    pub vel: u16,
16088    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16089    pub vn: i16,
16090    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16091    pub ve: i16,
16092    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16093    pub vd: i16,
16094    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16095    pub cog: u16,
16096    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
16097    pub fix_type: u8,
16098    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16099    pub satellites_visible: u8,
16100    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
16101    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16102    pub id: u8,
16103    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16104    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16105    pub yaw: u16,
16106}
16107impl HIL_GPS_DATA {
16108    pub const ENCODED_LEN: usize = 39usize;
16109    pub const DEFAULT: Self = Self {
16110        time_usec: 0_u64,
16111        lat: 0_i32,
16112        lon: 0_i32,
16113        alt: 0_i32,
16114        eph: 0_u16,
16115        epv: 0_u16,
16116        vel: 0_u16,
16117        vn: 0_i16,
16118        ve: 0_i16,
16119        vd: 0_i16,
16120        cog: 0_u16,
16121        fix_type: 0_u8,
16122        satellites_visible: 0_u8,
16123        id: 0_u8,
16124        yaw: 0_u16,
16125    };
16126    #[cfg(feature = "arbitrary")]
16127    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16128        use arbitrary::{Arbitrary, Unstructured};
16129        let mut buf = [0u8; 1024];
16130        rng.fill_bytes(&mut buf);
16131        let mut unstructured = Unstructured::new(&buf);
16132        Self::arbitrary(&mut unstructured).unwrap_or_default()
16133    }
16134}
16135impl Default for HIL_GPS_DATA {
16136    fn default() -> Self {
16137        Self::DEFAULT.clone()
16138    }
16139}
16140impl MessageData for HIL_GPS_DATA {
16141    type Message = MavMessage;
16142    const ID: u32 = 113u32;
16143    const NAME: &'static str = "HIL_GPS";
16144    const EXTRA_CRC: u8 = 124u8;
16145    const ENCODED_LEN: usize = 39usize;
16146    fn deser(
16147        _version: MavlinkVersion,
16148        __input: &[u8],
16149    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16150        let avail_len = __input.len();
16151        let mut payload_buf = [0; Self::ENCODED_LEN];
16152        let mut buf = if avail_len < Self::ENCODED_LEN {
16153            payload_buf[0..avail_len].copy_from_slice(__input);
16154            Bytes::new(&payload_buf)
16155        } else {
16156            Bytes::new(__input)
16157        };
16158        let mut __struct = Self::default();
16159        __struct.time_usec = buf.get_u64_le();
16160        __struct.lat = buf.get_i32_le();
16161        __struct.lon = buf.get_i32_le();
16162        __struct.alt = buf.get_i32_le();
16163        __struct.eph = buf.get_u16_le();
16164        __struct.epv = buf.get_u16_le();
16165        __struct.vel = buf.get_u16_le();
16166        __struct.vn = buf.get_i16_le();
16167        __struct.ve = buf.get_i16_le();
16168        __struct.vd = buf.get_i16_le();
16169        __struct.cog = buf.get_u16_le();
16170        __struct.fix_type = buf.get_u8();
16171        __struct.satellites_visible = buf.get_u8();
16172        __struct.id = buf.get_u8();
16173        __struct.yaw = buf.get_u16_le();
16174        Ok(__struct)
16175    }
16176    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16177        let mut __tmp = BytesMut::new(bytes);
16178        #[allow(clippy::absurd_extreme_comparisons)]
16179        #[allow(unused_comparisons)]
16180        if __tmp.remaining() < Self::ENCODED_LEN {
16181            panic!(
16182                "buffer is too small (need {} bytes, but got {})",
16183                Self::ENCODED_LEN,
16184                __tmp.remaining(),
16185            )
16186        }
16187        __tmp.put_u64_le(self.time_usec);
16188        __tmp.put_i32_le(self.lat);
16189        __tmp.put_i32_le(self.lon);
16190        __tmp.put_i32_le(self.alt);
16191        __tmp.put_u16_le(self.eph);
16192        __tmp.put_u16_le(self.epv);
16193        __tmp.put_u16_le(self.vel);
16194        __tmp.put_i16_le(self.vn);
16195        __tmp.put_i16_le(self.ve);
16196        __tmp.put_i16_le(self.vd);
16197        __tmp.put_u16_le(self.cog);
16198        __tmp.put_u8(self.fix_type);
16199        __tmp.put_u8(self.satellites_visible);
16200        __tmp.put_u8(self.id);
16201        __tmp.put_u16_le(self.yaw);
16202        if matches!(version, MavlinkVersion::V2) {
16203            let len = __tmp.len();
16204            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16205        } else {
16206            __tmp.len()
16207        }
16208    }
16209}
16210#[doc = "id: 114"]
16211#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16212#[derive(Debug, Clone, PartialEq)]
16213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16214#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16215pub struct HIL_OPTICAL_FLOW_DATA {
16216    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16217    pub time_usec: u64,
16218    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16219    pub integration_time_us: u32,
16220    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16221    pub integrated_x: f32,
16222    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16223    pub integrated_y: f32,
16224    #[doc = "RH rotation around X axis"]
16225    pub integrated_xgyro: f32,
16226    #[doc = "RH rotation around Y axis"]
16227    pub integrated_ygyro: f32,
16228    #[doc = "RH rotation around Z axis"]
16229    pub integrated_zgyro: f32,
16230    #[doc = "Time since the distance was sampled."]
16231    pub time_delta_distance_us: u32,
16232    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16233    pub distance: f32,
16234    #[doc = "Temperature"]
16235    pub temperature: i16,
16236    #[doc = "Sensor ID"]
16237    pub sensor_id: u8,
16238    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
16239    pub quality: u8,
16240}
16241impl HIL_OPTICAL_FLOW_DATA {
16242    pub const ENCODED_LEN: usize = 44usize;
16243    pub const DEFAULT: Self = Self {
16244        time_usec: 0_u64,
16245        integration_time_us: 0_u32,
16246        integrated_x: 0.0_f32,
16247        integrated_y: 0.0_f32,
16248        integrated_xgyro: 0.0_f32,
16249        integrated_ygyro: 0.0_f32,
16250        integrated_zgyro: 0.0_f32,
16251        time_delta_distance_us: 0_u32,
16252        distance: 0.0_f32,
16253        temperature: 0_i16,
16254        sensor_id: 0_u8,
16255        quality: 0_u8,
16256    };
16257    #[cfg(feature = "arbitrary")]
16258    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16259        use arbitrary::{Arbitrary, Unstructured};
16260        let mut buf = [0u8; 1024];
16261        rng.fill_bytes(&mut buf);
16262        let mut unstructured = Unstructured::new(&buf);
16263        Self::arbitrary(&mut unstructured).unwrap_or_default()
16264    }
16265}
16266impl Default for HIL_OPTICAL_FLOW_DATA {
16267    fn default() -> Self {
16268        Self::DEFAULT.clone()
16269    }
16270}
16271impl MessageData for HIL_OPTICAL_FLOW_DATA {
16272    type Message = MavMessage;
16273    const ID: u32 = 114u32;
16274    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16275    const EXTRA_CRC: u8 = 237u8;
16276    const ENCODED_LEN: usize = 44usize;
16277    fn deser(
16278        _version: MavlinkVersion,
16279        __input: &[u8],
16280    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16281        let avail_len = __input.len();
16282        let mut payload_buf = [0; Self::ENCODED_LEN];
16283        let mut buf = if avail_len < Self::ENCODED_LEN {
16284            payload_buf[0..avail_len].copy_from_slice(__input);
16285            Bytes::new(&payload_buf)
16286        } else {
16287            Bytes::new(__input)
16288        };
16289        let mut __struct = Self::default();
16290        __struct.time_usec = buf.get_u64_le();
16291        __struct.integration_time_us = buf.get_u32_le();
16292        __struct.integrated_x = buf.get_f32_le();
16293        __struct.integrated_y = buf.get_f32_le();
16294        __struct.integrated_xgyro = buf.get_f32_le();
16295        __struct.integrated_ygyro = buf.get_f32_le();
16296        __struct.integrated_zgyro = buf.get_f32_le();
16297        __struct.time_delta_distance_us = buf.get_u32_le();
16298        __struct.distance = buf.get_f32_le();
16299        __struct.temperature = buf.get_i16_le();
16300        __struct.sensor_id = buf.get_u8();
16301        __struct.quality = buf.get_u8();
16302        Ok(__struct)
16303    }
16304    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16305        let mut __tmp = BytesMut::new(bytes);
16306        #[allow(clippy::absurd_extreme_comparisons)]
16307        #[allow(unused_comparisons)]
16308        if __tmp.remaining() < Self::ENCODED_LEN {
16309            panic!(
16310                "buffer is too small (need {} bytes, but got {})",
16311                Self::ENCODED_LEN,
16312                __tmp.remaining(),
16313            )
16314        }
16315        __tmp.put_u64_le(self.time_usec);
16316        __tmp.put_u32_le(self.integration_time_us);
16317        __tmp.put_f32_le(self.integrated_x);
16318        __tmp.put_f32_le(self.integrated_y);
16319        __tmp.put_f32_le(self.integrated_xgyro);
16320        __tmp.put_f32_le(self.integrated_ygyro);
16321        __tmp.put_f32_le(self.integrated_zgyro);
16322        __tmp.put_u32_le(self.time_delta_distance_us);
16323        __tmp.put_f32_le(self.distance);
16324        __tmp.put_i16_le(self.temperature);
16325        __tmp.put_u8(self.sensor_id);
16326        __tmp.put_u8(self.quality);
16327        if matches!(version, MavlinkVersion::V2) {
16328            let len = __tmp.len();
16329            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16330        } else {
16331            __tmp.len()
16332        }
16333    }
16334}
16335#[doc = "id: 92"]
16336#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16337#[derive(Debug, Clone, PartialEq)]
16338#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16340pub struct HIL_RC_INPUTS_RAW_DATA {
16341    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16342    pub time_usec: u64,
16343    #[doc = "RC channel 1 value"]
16344    pub chan1_raw: u16,
16345    #[doc = "RC channel 2 value"]
16346    pub chan2_raw: u16,
16347    #[doc = "RC channel 3 value"]
16348    pub chan3_raw: u16,
16349    #[doc = "RC channel 4 value"]
16350    pub chan4_raw: u16,
16351    #[doc = "RC channel 5 value"]
16352    pub chan5_raw: u16,
16353    #[doc = "RC channel 6 value"]
16354    pub chan6_raw: u16,
16355    #[doc = "RC channel 7 value"]
16356    pub chan7_raw: u16,
16357    #[doc = "RC channel 8 value"]
16358    pub chan8_raw: u16,
16359    #[doc = "RC channel 9 value"]
16360    pub chan9_raw: u16,
16361    #[doc = "RC channel 10 value"]
16362    pub chan10_raw: u16,
16363    #[doc = "RC channel 11 value"]
16364    pub chan11_raw: u16,
16365    #[doc = "RC channel 12 value"]
16366    pub chan12_raw: u16,
16367    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16368    pub rssi: u8,
16369}
16370impl HIL_RC_INPUTS_RAW_DATA {
16371    pub const ENCODED_LEN: usize = 33usize;
16372    pub const DEFAULT: Self = Self {
16373        time_usec: 0_u64,
16374        chan1_raw: 0_u16,
16375        chan2_raw: 0_u16,
16376        chan3_raw: 0_u16,
16377        chan4_raw: 0_u16,
16378        chan5_raw: 0_u16,
16379        chan6_raw: 0_u16,
16380        chan7_raw: 0_u16,
16381        chan8_raw: 0_u16,
16382        chan9_raw: 0_u16,
16383        chan10_raw: 0_u16,
16384        chan11_raw: 0_u16,
16385        chan12_raw: 0_u16,
16386        rssi: 0_u8,
16387    };
16388    #[cfg(feature = "arbitrary")]
16389    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16390        use arbitrary::{Arbitrary, Unstructured};
16391        let mut buf = [0u8; 1024];
16392        rng.fill_bytes(&mut buf);
16393        let mut unstructured = Unstructured::new(&buf);
16394        Self::arbitrary(&mut unstructured).unwrap_or_default()
16395    }
16396}
16397impl Default for HIL_RC_INPUTS_RAW_DATA {
16398    fn default() -> Self {
16399        Self::DEFAULT.clone()
16400    }
16401}
16402impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16403    type Message = MavMessage;
16404    const ID: u32 = 92u32;
16405    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16406    const EXTRA_CRC: u8 = 54u8;
16407    const ENCODED_LEN: usize = 33usize;
16408    fn deser(
16409        _version: MavlinkVersion,
16410        __input: &[u8],
16411    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16412        let avail_len = __input.len();
16413        let mut payload_buf = [0; Self::ENCODED_LEN];
16414        let mut buf = if avail_len < Self::ENCODED_LEN {
16415            payload_buf[0..avail_len].copy_from_slice(__input);
16416            Bytes::new(&payload_buf)
16417        } else {
16418            Bytes::new(__input)
16419        };
16420        let mut __struct = Self::default();
16421        __struct.time_usec = buf.get_u64_le();
16422        __struct.chan1_raw = buf.get_u16_le();
16423        __struct.chan2_raw = buf.get_u16_le();
16424        __struct.chan3_raw = buf.get_u16_le();
16425        __struct.chan4_raw = buf.get_u16_le();
16426        __struct.chan5_raw = buf.get_u16_le();
16427        __struct.chan6_raw = buf.get_u16_le();
16428        __struct.chan7_raw = buf.get_u16_le();
16429        __struct.chan8_raw = buf.get_u16_le();
16430        __struct.chan9_raw = buf.get_u16_le();
16431        __struct.chan10_raw = buf.get_u16_le();
16432        __struct.chan11_raw = buf.get_u16_le();
16433        __struct.chan12_raw = buf.get_u16_le();
16434        __struct.rssi = buf.get_u8();
16435        Ok(__struct)
16436    }
16437    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16438        let mut __tmp = BytesMut::new(bytes);
16439        #[allow(clippy::absurd_extreme_comparisons)]
16440        #[allow(unused_comparisons)]
16441        if __tmp.remaining() < Self::ENCODED_LEN {
16442            panic!(
16443                "buffer is too small (need {} bytes, but got {})",
16444                Self::ENCODED_LEN,
16445                __tmp.remaining(),
16446            )
16447        }
16448        __tmp.put_u64_le(self.time_usec);
16449        __tmp.put_u16_le(self.chan1_raw);
16450        __tmp.put_u16_le(self.chan2_raw);
16451        __tmp.put_u16_le(self.chan3_raw);
16452        __tmp.put_u16_le(self.chan4_raw);
16453        __tmp.put_u16_le(self.chan5_raw);
16454        __tmp.put_u16_le(self.chan6_raw);
16455        __tmp.put_u16_le(self.chan7_raw);
16456        __tmp.put_u16_le(self.chan8_raw);
16457        __tmp.put_u16_le(self.chan9_raw);
16458        __tmp.put_u16_le(self.chan10_raw);
16459        __tmp.put_u16_le(self.chan11_raw);
16460        __tmp.put_u16_le(self.chan12_raw);
16461        __tmp.put_u8(self.rssi);
16462        if matches!(version, MavlinkVersion::V2) {
16463            let len = __tmp.len();
16464            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16465        } else {
16466            __tmp.len()
16467        }
16468    }
16469}
16470#[doc = "id: 107"]
16471#[doc = "The IMU readings in SI units in NED body frame."]
16472#[derive(Debug, Clone, PartialEq)]
16473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16474#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16475pub struct HIL_SENSOR_DATA {
16476    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16477    pub time_usec: u64,
16478    #[doc = "X acceleration"]
16479    pub xacc: f32,
16480    #[doc = "Y acceleration"]
16481    pub yacc: f32,
16482    #[doc = "Z acceleration"]
16483    pub zacc: f32,
16484    #[doc = "Angular speed around X axis in body frame"]
16485    pub xgyro: f32,
16486    #[doc = "Angular speed around Y axis in body frame"]
16487    pub ygyro: f32,
16488    #[doc = "Angular speed around Z axis in body frame"]
16489    pub zgyro: f32,
16490    #[doc = "X Magnetic field"]
16491    pub xmag: f32,
16492    #[doc = "Y Magnetic field"]
16493    pub ymag: f32,
16494    #[doc = "Z Magnetic field"]
16495    pub zmag: f32,
16496    #[doc = "Absolute pressure"]
16497    pub abs_pressure: f32,
16498    #[doc = "Differential pressure (airspeed)"]
16499    pub diff_pressure: f32,
16500    #[doc = "Altitude calculated from pressure"]
16501    pub pressure_alt: f32,
16502    #[doc = "Temperature"]
16503    pub temperature: f32,
16504    #[doc = "Bitmap for fields that have updated since last message"]
16505    pub fields_updated: HilSensorUpdatedFlags,
16506    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16507    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16508    pub id: u8,
16509}
16510impl HIL_SENSOR_DATA {
16511    pub const ENCODED_LEN: usize = 65usize;
16512    pub const DEFAULT: Self = Self {
16513        time_usec: 0_u64,
16514        xacc: 0.0_f32,
16515        yacc: 0.0_f32,
16516        zacc: 0.0_f32,
16517        xgyro: 0.0_f32,
16518        ygyro: 0.0_f32,
16519        zgyro: 0.0_f32,
16520        xmag: 0.0_f32,
16521        ymag: 0.0_f32,
16522        zmag: 0.0_f32,
16523        abs_pressure: 0.0_f32,
16524        diff_pressure: 0.0_f32,
16525        pressure_alt: 0.0_f32,
16526        temperature: 0.0_f32,
16527        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16528        id: 0_u8,
16529    };
16530    #[cfg(feature = "arbitrary")]
16531    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16532        use arbitrary::{Arbitrary, Unstructured};
16533        let mut buf = [0u8; 1024];
16534        rng.fill_bytes(&mut buf);
16535        let mut unstructured = Unstructured::new(&buf);
16536        Self::arbitrary(&mut unstructured).unwrap_or_default()
16537    }
16538}
16539impl Default for HIL_SENSOR_DATA {
16540    fn default() -> Self {
16541        Self::DEFAULT.clone()
16542    }
16543}
16544impl MessageData for HIL_SENSOR_DATA {
16545    type Message = MavMessage;
16546    const ID: u32 = 107u32;
16547    const NAME: &'static str = "HIL_SENSOR";
16548    const EXTRA_CRC: u8 = 108u8;
16549    const ENCODED_LEN: usize = 65usize;
16550    fn deser(
16551        _version: MavlinkVersion,
16552        __input: &[u8],
16553    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16554        let avail_len = __input.len();
16555        let mut payload_buf = [0; Self::ENCODED_LEN];
16556        let mut buf = if avail_len < Self::ENCODED_LEN {
16557            payload_buf[0..avail_len].copy_from_slice(__input);
16558            Bytes::new(&payload_buf)
16559        } else {
16560            Bytes::new(__input)
16561        };
16562        let mut __struct = Self::default();
16563        __struct.time_usec = buf.get_u64_le();
16564        __struct.xacc = buf.get_f32_le();
16565        __struct.yacc = buf.get_f32_le();
16566        __struct.zacc = buf.get_f32_le();
16567        __struct.xgyro = buf.get_f32_le();
16568        __struct.ygyro = buf.get_f32_le();
16569        __struct.zgyro = buf.get_f32_le();
16570        __struct.xmag = buf.get_f32_le();
16571        __struct.ymag = buf.get_f32_le();
16572        __struct.zmag = buf.get_f32_le();
16573        __struct.abs_pressure = buf.get_f32_le();
16574        __struct.diff_pressure = buf.get_f32_le();
16575        __struct.pressure_alt = buf.get_f32_le();
16576        __struct.temperature = buf.get_f32_le();
16577        let tmp = buf.get_u32_le();
16578        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16579            tmp & HilSensorUpdatedFlags::all().bits(),
16580        )
16581        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16582            flag_type: "HilSensorUpdatedFlags",
16583            value: tmp as u32,
16584        })?;
16585        __struct.id = buf.get_u8();
16586        Ok(__struct)
16587    }
16588    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16589        let mut __tmp = BytesMut::new(bytes);
16590        #[allow(clippy::absurd_extreme_comparisons)]
16591        #[allow(unused_comparisons)]
16592        if __tmp.remaining() < Self::ENCODED_LEN {
16593            panic!(
16594                "buffer is too small (need {} bytes, but got {})",
16595                Self::ENCODED_LEN,
16596                __tmp.remaining(),
16597            )
16598        }
16599        __tmp.put_u64_le(self.time_usec);
16600        __tmp.put_f32_le(self.xacc);
16601        __tmp.put_f32_le(self.yacc);
16602        __tmp.put_f32_le(self.zacc);
16603        __tmp.put_f32_le(self.xgyro);
16604        __tmp.put_f32_le(self.ygyro);
16605        __tmp.put_f32_le(self.zgyro);
16606        __tmp.put_f32_le(self.xmag);
16607        __tmp.put_f32_le(self.ymag);
16608        __tmp.put_f32_le(self.zmag);
16609        __tmp.put_f32_le(self.abs_pressure);
16610        __tmp.put_f32_le(self.diff_pressure);
16611        __tmp.put_f32_le(self.pressure_alt);
16612        __tmp.put_f32_le(self.temperature);
16613        __tmp.put_u32_le(self.fields_updated.bits());
16614        __tmp.put_u8(self.id);
16615        if matches!(version, MavlinkVersion::V2) {
16616            let len = __tmp.len();
16617            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16618        } else {
16619            __tmp.len()
16620        }
16621    }
16622}
16623#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16624#[doc = "id: 90"]
16625#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16626#[derive(Debug, Clone, PartialEq)]
16627#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16628#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16629pub struct HIL_STATE_DATA {
16630    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16631    pub time_usec: u64,
16632    #[doc = "Roll angle"]
16633    pub roll: f32,
16634    #[doc = "Pitch angle"]
16635    pub pitch: f32,
16636    #[doc = "Yaw angle"]
16637    pub yaw: f32,
16638    #[doc = "Body frame roll / phi angular speed"]
16639    pub rollspeed: f32,
16640    #[doc = "Body frame pitch / theta angular speed"]
16641    pub pitchspeed: f32,
16642    #[doc = "Body frame yaw / psi angular speed"]
16643    pub yawspeed: f32,
16644    #[doc = "Latitude"]
16645    pub lat: i32,
16646    #[doc = "Longitude"]
16647    pub lon: i32,
16648    #[doc = "Altitude"]
16649    pub alt: i32,
16650    #[doc = "Ground X Speed (Latitude)"]
16651    pub vx: i16,
16652    #[doc = "Ground Y Speed (Longitude)"]
16653    pub vy: i16,
16654    #[doc = "Ground Z Speed (Altitude)"]
16655    pub vz: i16,
16656    #[doc = "X acceleration"]
16657    pub xacc: i16,
16658    #[doc = "Y acceleration"]
16659    pub yacc: i16,
16660    #[doc = "Z acceleration"]
16661    pub zacc: i16,
16662}
16663impl HIL_STATE_DATA {
16664    pub const ENCODED_LEN: usize = 56usize;
16665    pub const DEFAULT: Self = Self {
16666        time_usec: 0_u64,
16667        roll: 0.0_f32,
16668        pitch: 0.0_f32,
16669        yaw: 0.0_f32,
16670        rollspeed: 0.0_f32,
16671        pitchspeed: 0.0_f32,
16672        yawspeed: 0.0_f32,
16673        lat: 0_i32,
16674        lon: 0_i32,
16675        alt: 0_i32,
16676        vx: 0_i16,
16677        vy: 0_i16,
16678        vz: 0_i16,
16679        xacc: 0_i16,
16680        yacc: 0_i16,
16681        zacc: 0_i16,
16682    };
16683    #[cfg(feature = "arbitrary")]
16684    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16685        use arbitrary::{Arbitrary, Unstructured};
16686        let mut buf = [0u8; 1024];
16687        rng.fill_bytes(&mut buf);
16688        let mut unstructured = Unstructured::new(&buf);
16689        Self::arbitrary(&mut unstructured).unwrap_or_default()
16690    }
16691}
16692impl Default for HIL_STATE_DATA {
16693    fn default() -> Self {
16694        Self::DEFAULT.clone()
16695    }
16696}
16697impl MessageData for HIL_STATE_DATA {
16698    type Message = MavMessage;
16699    const ID: u32 = 90u32;
16700    const NAME: &'static str = "HIL_STATE";
16701    const EXTRA_CRC: u8 = 183u8;
16702    const ENCODED_LEN: usize = 56usize;
16703    fn deser(
16704        _version: MavlinkVersion,
16705        __input: &[u8],
16706    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16707        let avail_len = __input.len();
16708        let mut payload_buf = [0; Self::ENCODED_LEN];
16709        let mut buf = if avail_len < Self::ENCODED_LEN {
16710            payload_buf[0..avail_len].copy_from_slice(__input);
16711            Bytes::new(&payload_buf)
16712        } else {
16713            Bytes::new(__input)
16714        };
16715        let mut __struct = Self::default();
16716        __struct.time_usec = buf.get_u64_le();
16717        __struct.roll = buf.get_f32_le();
16718        __struct.pitch = buf.get_f32_le();
16719        __struct.yaw = buf.get_f32_le();
16720        __struct.rollspeed = buf.get_f32_le();
16721        __struct.pitchspeed = buf.get_f32_le();
16722        __struct.yawspeed = buf.get_f32_le();
16723        __struct.lat = buf.get_i32_le();
16724        __struct.lon = buf.get_i32_le();
16725        __struct.alt = buf.get_i32_le();
16726        __struct.vx = buf.get_i16_le();
16727        __struct.vy = buf.get_i16_le();
16728        __struct.vz = buf.get_i16_le();
16729        __struct.xacc = buf.get_i16_le();
16730        __struct.yacc = buf.get_i16_le();
16731        __struct.zacc = buf.get_i16_le();
16732        Ok(__struct)
16733    }
16734    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16735        let mut __tmp = BytesMut::new(bytes);
16736        #[allow(clippy::absurd_extreme_comparisons)]
16737        #[allow(unused_comparisons)]
16738        if __tmp.remaining() < Self::ENCODED_LEN {
16739            panic!(
16740                "buffer is too small (need {} bytes, but got {})",
16741                Self::ENCODED_LEN,
16742                __tmp.remaining(),
16743            )
16744        }
16745        __tmp.put_u64_le(self.time_usec);
16746        __tmp.put_f32_le(self.roll);
16747        __tmp.put_f32_le(self.pitch);
16748        __tmp.put_f32_le(self.yaw);
16749        __tmp.put_f32_le(self.rollspeed);
16750        __tmp.put_f32_le(self.pitchspeed);
16751        __tmp.put_f32_le(self.yawspeed);
16752        __tmp.put_i32_le(self.lat);
16753        __tmp.put_i32_le(self.lon);
16754        __tmp.put_i32_le(self.alt);
16755        __tmp.put_i16_le(self.vx);
16756        __tmp.put_i16_le(self.vy);
16757        __tmp.put_i16_le(self.vz);
16758        __tmp.put_i16_le(self.xacc);
16759        __tmp.put_i16_le(self.yacc);
16760        __tmp.put_i16_le(self.zacc);
16761        if matches!(version, MavlinkVersion::V2) {
16762            let len = __tmp.len();
16763            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16764        } else {
16765            __tmp.len()
16766        }
16767    }
16768}
16769#[doc = "id: 115"]
16770#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16771#[derive(Debug, Clone, PartialEq)]
16772#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16773#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16774pub struct HIL_STATE_QUATERNION_DATA {
16775    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16776    pub time_usec: u64,
16777    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16778    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16779    pub attitude_quaternion: [f32; 4],
16780    #[doc = "Body frame roll / phi angular speed"]
16781    pub rollspeed: f32,
16782    #[doc = "Body frame pitch / theta angular speed"]
16783    pub pitchspeed: f32,
16784    #[doc = "Body frame yaw / psi angular speed"]
16785    pub yawspeed: f32,
16786    #[doc = "Latitude"]
16787    pub lat: i32,
16788    #[doc = "Longitude"]
16789    pub lon: i32,
16790    #[doc = "Altitude"]
16791    pub alt: i32,
16792    #[doc = "Ground X Speed (Latitude)"]
16793    pub vx: i16,
16794    #[doc = "Ground Y Speed (Longitude)"]
16795    pub vy: i16,
16796    #[doc = "Ground Z Speed (Altitude)"]
16797    pub vz: i16,
16798    #[doc = "Indicated airspeed"]
16799    pub ind_airspeed: u16,
16800    #[doc = "True airspeed"]
16801    pub true_airspeed: u16,
16802    #[doc = "X acceleration"]
16803    pub xacc: i16,
16804    #[doc = "Y acceleration"]
16805    pub yacc: i16,
16806    #[doc = "Z acceleration"]
16807    pub zacc: i16,
16808}
16809impl HIL_STATE_QUATERNION_DATA {
16810    pub const ENCODED_LEN: usize = 64usize;
16811    pub const DEFAULT: Self = Self {
16812        time_usec: 0_u64,
16813        attitude_quaternion: [0.0_f32; 4usize],
16814        rollspeed: 0.0_f32,
16815        pitchspeed: 0.0_f32,
16816        yawspeed: 0.0_f32,
16817        lat: 0_i32,
16818        lon: 0_i32,
16819        alt: 0_i32,
16820        vx: 0_i16,
16821        vy: 0_i16,
16822        vz: 0_i16,
16823        ind_airspeed: 0_u16,
16824        true_airspeed: 0_u16,
16825        xacc: 0_i16,
16826        yacc: 0_i16,
16827        zacc: 0_i16,
16828    };
16829    #[cfg(feature = "arbitrary")]
16830    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16831        use arbitrary::{Arbitrary, Unstructured};
16832        let mut buf = [0u8; 1024];
16833        rng.fill_bytes(&mut buf);
16834        let mut unstructured = Unstructured::new(&buf);
16835        Self::arbitrary(&mut unstructured).unwrap_or_default()
16836    }
16837}
16838impl Default for HIL_STATE_QUATERNION_DATA {
16839    fn default() -> Self {
16840        Self::DEFAULT.clone()
16841    }
16842}
16843impl MessageData for HIL_STATE_QUATERNION_DATA {
16844    type Message = MavMessage;
16845    const ID: u32 = 115u32;
16846    const NAME: &'static str = "HIL_STATE_QUATERNION";
16847    const EXTRA_CRC: u8 = 4u8;
16848    const ENCODED_LEN: usize = 64usize;
16849    fn deser(
16850        _version: MavlinkVersion,
16851        __input: &[u8],
16852    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16853        let avail_len = __input.len();
16854        let mut payload_buf = [0; Self::ENCODED_LEN];
16855        let mut buf = if avail_len < Self::ENCODED_LEN {
16856            payload_buf[0..avail_len].copy_from_slice(__input);
16857            Bytes::new(&payload_buf)
16858        } else {
16859            Bytes::new(__input)
16860        };
16861        let mut __struct = Self::default();
16862        __struct.time_usec = buf.get_u64_le();
16863        for v in &mut __struct.attitude_quaternion {
16864            let val = buf.get_f32_le();
16865            *v = val;
16866        }
16867        __struct.rollspeed = buf.get_f32_le();
16868        __struct.pitchspeed = buf.get_f32_le();
16869        __struct.yawspeed = buf.get_f32_le();
16870        __struct.lat = buf.get_i32_le();
16871        __struct.lon = buf.get_i32_le();
16872        __struct.alt = buf.get_i32_le();
16873        __struct.vx = buf.get_i16_le();
16874        __struct.vy = buf.get_i16_le();
16875        __struct.vz = buf.get_i16_le();
16876        __struct.ind_airspeed = buf.get_u16_le();
16877        __struct.true_airspeed = buf.get_u16_le();
16878        __struct.xacc = buf.get_i16_le();
16879        __struct.yacc = buf.get_i16_le();
16880        __struct.zacc = buf.get_i16_le();
16881        Ok(__struct)
16882    }
16883    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16884        let mut __tmp = BytesMut::new(bytes);
16885        #[allow(clippy::absurd_extreme_comparisons)]
16886        #[allow(unused_comparisons)]
16887        if __tmp.remaining() < Self::ENCODED_LEN {
16888            panic!(
16889                "buffer is too small (need {} bytes, but got {})",
16890                Self::ENCODED_LEN,
16891                __tmp.remaining(),
16892            )
16893        }
16894        __tmp.put_u64_le(self.time_usec);
16895        for val in &self.attitude_quaternion {
16896            __tmp.put_f32_le(*val);
16897        }
16898        __tmp.put_f32_le(self.rollspeed);
16899        __tmp.put_f32_le(self.pitchspeed);
16900        __tmp.put_f32_le(self.yawspeed);
16901        __tmp.put_i32_le(self.lat);
16902        __tmp.put_i32_le(self.lon);
16903        __tmp.put_i32_le(self.alt);
16904        __tmp.put_i16_le(self.vx);
16905        __tmp.put_i16_le(self.vy);
16906        __tmp.put_i16_le(self.vz);
16907        __tmp.put_u16_le(self.ind_airspeed);
16908        __tmp.put_u16_le(self.true_airspeed);
16909        __tmp.put_i16_le(self.xacc);
16910        __tmp.put_i16_le(self.yacc);
16911        __tmp.put_i16_le(self.zacc);
16912        if matches!(version, MavlinkVersion::V2) {
16913            let len = __tmp.len();
16914            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16915        } else {
16916            __tmp.len()
16917        }
16918    }
16919}
16920#[doc = "id: 242"]
16921#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
16922#[derive(Debug, Clone, PartialEq)]
16923#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16924#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16925pub struct HOME_POSITION_DATA {
16926    #[doc = "Latitude (WGS84)"]
16927    pub latitude: i32,
16928    #[doc = "Longitude (WGS84)"]
16929    pub longitude: i32,
16930    #[doc = "Altitude (MSL). Positive for up."]
16931    pub altitude: i32,
16932    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
16933    pub x: f32,
16934    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
16935    pub y: f32,
16936    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
16937    pub z: f32,
16938    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
16939    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16940    pub q: [f32; 4],
16941    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16942    pub approach_x: f32,
16943    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16944    pub approach_y: f32,
16945    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16946    pub approach_z: f32,
16947    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16948    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16949    pub time_usec: u64,
16950}
16951impl HOME_POSITION_DATA {
16952    pub const ENCODED_LEN: usize = 60usize;
16953    pub const DEFAULT: Self = Self {
16954        latitude: 0_i32,
16955        longitude: 0_i32,
16956        altitude: 0_i32,
16957        x: 0.0_f32,
16958        y: 0.0_f32,
16959        z: 0.0_f32,
16960        q: [0.0_f32; 4usize],
16961        approach_x: 0.0_f32,
16962        approach_y: 0.0_f32,
16963        approach_z: 0.0_f32,
16964        time_usec: 0_u64,
16965    };
16966    #[cfg(feature = "arbitrary")]
16967    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16968        use arbitrary::{Arbitrary, Unstructured};
16969        let mut buf = [0u8; 1024];
16970        rng.fill_bytes(&mut buf);
16971        let mut unstructured = Unstructured::new(&buf);
16972        Self::arbitrary(&mut unstructured).unwrap_or_default()
16973    }
16974}
16975impl Default for HOME_POSITION_DATA {
16976    fn default() -> Self {
16977        Self::DEFAULT.clone()
16978    }
16979}
16980impl MessageData for HOME_POSITION_DATA {
16981    type Message = MavMessage;
16982    const ID: u32 = 242u32;
16983    const NAME: &'static str = "HOME_POSITION";
16984    const EXTRA_CRC: u8 = 104u8;
16985    const ENCODED_LEN: usize = 60usize;
16986    fn deser(
16987        _version: MavlinkVersion,
16988        __input: &[u8],
16989    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16990        let avail_len = __input.len();
16991        let mut payload_buf = [0; Self::ENCODED_LEN];
16992        let mut buf = if avail_len < Self::ENCODED_LEN {
16993            payload_buf[0..avail_len].copy_from_slice(__input);
16994            Bytes::new(&payload_buf)
16995        } else {
16996            Bytes::new(__input)
16997        };
16998        let mut __struct = Self::default();
16999        __struct.latitude = buf.get_i32_le();
17000        __struct.longitude = buf.get_i32_le();
17001        __struct.altitude = buf.get_i32_le();
17002        __struct.x = buf.get_f32_le();
17003        __struct.y = buf.get_f32_le();
17004        __struct.z = buf.get_f32_le();
17005        for v in &mut __struct.q {
17006            let val = buf.get_f32_le();
17007            *v = val;
17008        }
17009        __struct.approach_x = buf.get_f32_le();
17010        __struct.approach_y = buf.get_f32_le();
17011        __struct.approach_z = buf.get_f32_le();
17012        __struct.time_usec = buf.get_u64_le();
17013        Ok(__struct)
17014    }
17015    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17016        let mut __tmp = BytesMut::new(bytes);
17017        #[allow(clippy::absurd_extreme_comparisons)]
17018        #[allow(unused_comparisons)]
17019        if __tmp.remaining() < Self::ENCODED_LEN {
17020            panic!(
17021                "buffer is too small (need {} bytes, but got {})",
17022                Self::ENCODED_LEN,
17023                __tmp.remaining(),
17024            )
17025        }
17026        __tmp.put_i32_le(self.latitude);
17027        __tmp.put_i32_le(self.longitude);
17028        __tmp.put_i32_le(self.altitude);
17029        __tmp.put_f32_le(self.x);
17030        __tmp.put_f32_le(self.y);
17031        __tmp.put_f32_le(self.z);
17032        for val in &self.q {
17033            __tmp.put_f32_le(*val);
17034        }
17035        __tmp.put_f32_le(self.approach_x);
17036        __tmp.put_f32_le(self.approach_y);
17037        __tmp.put_f32_le(self.approach_z);
17038        __tmp.put_u64_le(self.time_usec);
17039        if matches!(version, MavlinkVersion::V2) {
17040            let len = __tmp.len();
17041            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17042        } else {
17043            __tmp.len()
17044        }
17045    }
17046}
17047#[doc = "id: 12920"]
17048#[doc = "Temperature and humidity from hygrometer."]
17049#[derive(Debug, Clone, PartialEq)]
17050#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17051#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17052pub struct HYGROMETER_SENSOR_DATA {
17053    #[doc = "Temperature"]
17054    pub temperature: i16,
17055    #[doc = "Humidity"]
17056    pub humidity: u16,
17057    #[doc = "Hygrometer ID"]
17058    pub id: u8,
17059}
17060impl HYGROMETER_SENSOR_DATA {
17061    pub const ENCODED_LEN: usize = 5usize;
17062    pub const DEFAULT: Self = Self {
17063        temperature: 0_i16,
17064        humidity: 0_u16,
17065        id: 0_u8,
17066    };
17067    #[cfg(feature = "arbitrary")]
17068    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17069        use arbitrary::{Arbitrary, Unstructured};
17070        let mut buf = [0u8; 1024];
17071        rng.fill_bytes(&mut buf);
17072        let mut unstructured = Unstructured::new(&buf);
17073        Self::arbitrary(&mut unstructured).unwrap_or_default()
17074    }
17075}
17076impl Default for HYGROMETER_SENSOR_DATA {
17077    fn default() -> Self {
17078        Self::DEFAULT.clone()
17079    }
17080}
17081impl MessageData for HYGROMETER_SENSOR_DATA {
17082    type Message = MavMessage;
17083    const ID: u32 = 12920u32;
17084    const NAME: &'static str = "HYGROMETER_SENSOR";
17085    const EXTRA_CRC: u8 = 20u8;
17086    const ENCODED_LEN: usize = 5usize;
17087    fn deser(
17088        _version: MavlinkVersion,
17089        __input: &[u8],
17090    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17091        let avail_len = __input.len();
17092        let mut payload_buf = [0; Self::ENCODED_LEN];
17093        let mut buf = if avail_len < Self::ENCODED_LEN {
17094            payload_buf[0..avail_len].copy_from_slice(__input);
17095            Bytes::new(&payload_buf)
17096        } else {
17097            Bytes::new(__input)
17098        };
17099        let mut __struct = Self::default();
17100        __struct.temperature = buf.get_i16_le();
17101        __struct.humidity = buf.get_u16_le();
17102        __struct.id = buf.get_u8();
17103        Ok(__struct)
17104    }
17105    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17106        let mut __tmp = BytesMut::new(bytes);
17107        #[allow(clippy::absurd_extreme_comparisons)]
17108        #[allow(unused_comparisons)]
17109        if __tmp.remaining() < Self::ENCODED_LEN {
17110            panic!(
17111                "buffer is too small (need {} bytes, but got {})",
17112                Self::ENCODED_LEN,
17113                __tmp.remaining(),
17114            )
17115        }
17116        __tmp.put_i16_le(self.temperature);
17117        __tmp.put_u16_le(self.humidity);
17118        __tmp.put_u8(self.id);
17119        if matches!(version, MavlinkVersion::V2) {
17120            let len = __tmp.len();
17121            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17122        } else {
17123            __tmp.len()
17124        }
17125    }
17126}
17127#[doc = "id: 440"]
17128#[doc = "Illuminator status."]
17129#[derive(Debug, Clone, PartialEq)]
17130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17131#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17132pub struct ILLUMINATOR_STATUS_DATA {
17133    #[doc = "Time since the start-up of the illuminator in ms"]
17134    pub uptime_ms: u32,
17135    #[doc = "Errors"]
17136    pub error_status: IlluminatorErrorFlags,
17137    #[doc = "Illuminator brightness"]
17138    pub brightness: f32,
17139    #[doc = "Illuminator strobing period in seconds"]
17140    pub strobe_period: f32,
17141    #[doc = "Illuminator strobing duty cycle"]
17142    pub strobe_duty_cycle: f32,
17143    #[doc = "Temperature in Celsius"]
17144    pub temp_c: f32,
17145    #[doc = "Minimum strobing period in seconds"]
17146    pub min_strobe_period: f32,
17147    #[doc = "Maximum strobing period in seconds"]
17148    pub max_strobe_period: f32,
17149    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17150    pub enable: u8,
17151    #[doc = "Supported illuminator modes"]
17152    pub mode_bitmask: IlluminatorMode,
17153    #[doc = "Illuminator mode"]
17154    pub mode: IlluminatorMode,
17155}
17156impl ILLUMINATOR_STATUS_DATA {
17157    pub const ENCODED_LEN: usize = 35usize;
17158    pub const DEFAULT: Self = Self {
17159        uptime_ms: 0_u32,
17160        error_status: IlluminatorErrorFlags::DEFAULT,
17161        brightness: 0.0_f32,
17162        strobe_period: 0.0_f32,
17163        strobe_duty_cycle: 0.0_f32,
17164        temp_c: 0.0_f32,
17165        min_strobe_period: 0.0_f32,
17166        max_strobe_period: 0.0_f32,
17167        enable: 0_u8,
17168        mode_bitmask: IlluminatorMode::DEFAULT,
17169        mode: IlluminatorMode::DEFAULT,
17170    };
17171    #[cfg(feature = "arbitrary")]
17172    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17173        use arbitrary::{Arbitrary, Unstructured};
17174        let mut buf = [0u8; 1024];
17175        rng.fill_bytes(&mut buf);
17176        let mut unstructured = Unstructured::new(&buf);
17177        Self::arbitrary(&mut unstructured).unwrap_or_default()
17178    }
17179}
17180impl Default for ILLUMINATOR_STATUS_DATA {
17181    fn default() -> Self {
17182        Self::DEFAULT.clone()
17183    }
17184}
17185impl MessageData for ILLUMINATOR_STATUS_DATA {
17186    type Message = MavMessage;
17187    const ID: u32 = 440u32;
17188    const NAME: &'static str = "ILLUMINATOR_STATUS";
17189    const EXTRA_CRC: u8 = 66u8;
17190    const ENCODED_LEN: usize = 35usize;
17191    fn deser(
17192        _version: MavlinkVersion,
17193        __input: &[u8],
17194    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17195        let avail_len = __input.len();
17196        let mut payload_buf = [0; Self::ENCODED_LEN];
17197        let mut buf = if avail_len < Self::ENCODED_LEN {
17198            payload_buf[0..avail_len].copy_from_slice(__input);
17199            Bytes::new(&payload_buf)
17200        } else {
17201            Bytes::new(__input)
17202        };
17203        let mut __struct = Self::default();
17204        __struct.uptime_ms = buf.get_u32_le();
17205        let tmp = buf.get_u32_le();
17206        __struct.error_status = IlluminatorErrorFlags::from_bits(
17207            tmp & IlluminatorErrorFlags::all().bits(),
17208        )
17209        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17210            flag_type: "IlluminatorErrorFlags",
17211            value: tmp as u32,
17212        })?;
17213        __struct.brightness = buf.get_f32_le();
17214        __struct.strobe_period = buf.get_f32_le();
17215        __struct.strobe_duty_cycle = buf.get_f32_le();
17216        __struct.temp_c = buf.get_f32_le();
17217        __struct.min_strobe_period = buf.get_f32_le();
17218        __struct.max_strobe_period = buf.get_f32_le();
17219        __struct.enable = buf.get_u8();
17220        let tmp = buf.get_u8();
17221        __struct.mode_bitmask =
17222            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17223                enum_type: "IlluminatorMode",
17224                value: tmp as u32,
17225            })?;
17226        let tmp = buf.get_u8();
17227        __struct.mode =
17228            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17229                enum_type: "IlluminatorMode",
17230                value: tmp as u32,
17231            })?;
17232        Ok(__struct)
17233    }
17234    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17235        let mut __tmp = BytesMut::new(bytes);
17236        #[allow(clippy::absurd_extreme_comparisons)]
17237        #[allow(unused_comparisons)]
17238        if __tmp.remaining() < Self::ENCODED_LEN {
17239            panic!(
17240                "buffer is too small (need {} bytes, but got {})",
17241                Self::ENCODED_LEN,
17242                __tmp.remaining(),
17243            )
17244        }
17245        __tmp.put_u32_le(self.uptime_ms);
17246        __tmp.put_u32_le(self.error_status.bits());
17247        __tmp.put_f32_le(self.brightness);
17248        __tmp.put_f32_le(self.strobe_period);
17249        __tmp.put_f32_le(self.strobe_duty_cycle);
17250        __tmp.put_f32_le(self.temp_c);
17251        __tmp.put_f32_le(self.min_strobe_period);
17252        __tmp.put_f32_le(self.max_strobe_period);
17253        __tmp.put_u8(self.enable);
17254        __tmp.put_u8(self.mode_bitmask as u8);
17255        __tmp.put_u8(self.mode as u8);
17256        if matches!(version, MavlinkVersion::V2) {
17257            let len = __tmp.len();
17258            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17259        } else {
17260            __tmp.len()
17261        }
17262    }
17263}
17264#[doc = "id: 335"]
17265#[doc = "Status of the Iridium SBD link."]
17266#[derive(Debug, Clone, PartialEq)]
17267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17268#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17269pub struct ISBD_LINK_STATUS_DATA {
17270    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17271    pub timestamp: u64,
17272    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17273    pub last_heartbeat: u64,
17274    #[doc = "Number of failed SBD sessions."]
17275    pub failed_sessions: u16,
17276    #[doc = "Number of successful SBD sessions."]
17277    pub successful_sessions: u16,
17278    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17279    pub signal_quality: u8,
17280    #[doc = "1: Ring call pending, 0: No call pending."]
17281    pub ring_pending: u8,
17282    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17283    pub tx_session_pending: u8,
17284    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17285    pub rx_session_pending: u8,
17286}
17287impl ISBD_LINK_STATUS_DATA {
17288    pub const ENCODED_LEN: usize = 24usize;
17289    pub const DEFAULT: Self = Self {
17290        timestamp: 0_u64,
17291        last_heartbeat: 0_u64,
17292        failed_sessions: 0_u16,
17293        successful_sessions: 0_u16,
17294        signal_quality: 0_u8,
17295        ring_pending: 0_u8,
17296        tx_session_pending: 0_u8,
17297        rx_session_pending: 0_u8,
17298    };
17299    #[cfg(feature = "arbitrary")]
17300    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17301        use arbitrary::{Arbitrary, Unstructured};
17302        let mut buf = [0u8; 1024];
17303        rng.fill_bytes(&mut buf);
17304        let mut unstructured = Unstructured::new(&buf);
17305        Self::arbitrary(&mut unstructured).unwrap_or_default()
17306    }
17307}
17308impl Default for ISBD_LINK_STATUS_DATA {
17309    fn default() -> Self {
17310        Self::DEFAULT.clone()
17311    }
17312}
17313impl MessageData for ISBD_LINK_STATUS_DATA {
17314    type Message = MavMessage;
17315    const ID: u32 = 335u32;
17316    const NAME: &'static str = "ISBD_LINK_STATUS";
17317    const EXTRA_CRC: u8 = 225u8;
17318    const ENCODED_LEN: usize = 24usize;
17319    fn deser(
17320        _version: MavlinkVersion,
17321        __input: &[u8],
17322    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17323        let avail_len = __input.len();
17324        let mut payload_buf = [0; Self::ENCODED_LEN];
17325        let mut buf = if avail_len < Self::ENCODED_LEN {
17326            payload_buf[0..avail_len].copy_from_slice(__input);
17327            Bytes::new(&payload_buf)
17328        } else {
17329            Bytes::new(__input)
17330        };
17331        let mut __struct = Self::default();
17332        __struct.timestamp = buf.get_u64_le();
17333        __struct.last_heartbeat = buf.get_u64_le();
17334        __struct.failed_sessions = buf.get_u16_le();
17335        __struct.successful_sessions = buf.get_u16_le();
17336        __struct.signal_quality = buf.get_u8();
17337        __struct.ring_pending = buf.get_u8();
17338        __struct.tx_session_pending = buf.get_u8();
17339        __struct.rx_session_pending = buf.get_u8();
17340        Ok(__struct)
17341    }
17342    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17343        let mut __tmp = BytesMut::new(bytes);
17344        #[allow(clippy::absurd_extreme_comparisons)]
17345        #[allow(unused_comparisons)]
17346        if __tmp.remaining() < Self::ENCODED_LEN {
17347            panic!(
17348                "buffer is too small (need {} bytes, but got {})",
17349                Self::ENCODED_LEN,
17350                __tmp.remaining(),
17351            )
17352        }
17353        __tmp.put_u64_le(self.timestamp);
17354        __tmp.put_u64_le(self.last_heartbeat);
17355        __tmp.put_u16_le(self.failed_sessions);
17356        __tmp.put_u16_le(self.successful_sessions);
17357        __tmp.put_u8(self.signal_quality);
17358        __tmp.put_u8(self.ring_pending);
17359        __tmp.put_u8(self.tx_session_pending);
17360        __tmp.put_u8(self.rx_session_pending);
17361        if matches!(version, MavlinkVersion::V2) {
17362            let len = __tmp.len();
17363            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17364        } else {
17365            __tmp.len()
17366        }
17367    }
17368}
17369#[doc = "id: 149"]
17370#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17371#[derive(Debug, Clone, PartialEq)]
17372#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17373#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17374pub struct LANDING_TARGET_DATA {
17375    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17376    pub time_usec: u64,
17377    #[doc = "X-axis angular offset of the target from the center of the image"]
17378    pub angle_x: f32,
17379    #[doc = "Y-axis angular offset of the target from the center of the image"]
17380    pub angle_y: f32,
17381    #[doc = "Distance to the target from the vehicle"]
17382    pub distance: f32,
17383    #[doc = "Size of target along x-axis"]
17384    pub size_x: f32,
17385    #[doc = "Size of target along y-axis"]
17386    pub size_y: f32,
17387    #[doc = "The ID of the target if multiple targets are present"]
17388    pub target_num: u8,
17389    #[doc = "Coordinate frame used for following fields."]
17390    pub frame: MavFrame,
17391    #[doc = "X Position of the landing target in MAV_FRAME"]
17392    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17393    pub x: f32,
17394    #[doc = "Y Position of the landing target in MAV_FRAME"]
17395    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17396    pub y: f32,
17397    #[doc = "Z Position of the landing target in MAV_FRAME"]
17398    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17399    pub z: f32,
17400    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17401    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17402    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17403    pub q: [f32; 4],
17404    #[doc = "Type of landing target"]
17405    #[cfg_attr(feature = "serde", serde(default))]
17406    pub mavtype: LandingTargetType,
17407    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17408    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17409    pub position_valid: u8,
17410}
17411impl LANDING_TARGET_DATA {
17412    pub const ENCODED_LEN: usize = 60usize;
17413    pub const DEFAULT: Self = Self {
17414        time_usec: 0_u64,
17415        angle_x: 0.0_f32,
17416        angle_y: 0.0_f32,
17417        distance: 0.0_f32,
17418        size_x: 0.0_f32,
17419        size_y: 0.0_f32,
17420        target_num: 0_u8,
17421        frame: MavFrame::DEFAULT,
17422        x: 0.0_f32,
17423        y: 0.0_f32,
17424        z: 0.0_f32,
17425        q: [0.0_f32; 4usize],
17426        mavtype: LandingTargetType::DEFAULT,
17427        position_valid: 0_u8,
17428    };
17429    #[cfg(feature = "arbitrary")]
17430    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17431        use arbitrary::{Arbitrary, Unstructured};
17432        let mut buf = [0u8; 1024];
17433        rng.fill_bytes(&mut buf);
17434        let mut unstructured = Unstructured::new(&buf);
17435        Self::arbitrary(&mut unstructured).unwrap_or_default()
17436    }
17437}
17438impl Default for LANDING_TARGET_DATA {
17439    fn default() -> Self {
17440        Self::DEFAULT.clone()
17441    }
17442}
17443impl MessageData for LANDING_TARGET_DATA {
17444    type Message = MavMessage;
17445    const ID: u32 = 149u32;
17446    const NAME: &'static str = "LANDING_TARGET";
17447    const EXTRA_CRC: u8 = 200u8;
17448    const ENCODED_LEN: usize = 60usize;
17449    fn deser(
17450        _version: MavlinkVersion,
17451        __input: &[u8],
17452    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17453        let avail_len = __input.len();
17454        let mut payload_buf = [0; Self::ENCODED_LEN];
17455        let mut buf = if avail_len < Self::ENCODED_LEN {
17456            payload_buf[0..avail_len].copy_from_slice(__input);
17457            Bytes::new(&payload_buf)
17458        } else {
17459            Bytes::new(__input)
17460        };
17461        let mut __struct = Self::default();
17462        __struct.time_usec = buf.get_u64_le();
17463        __struct.angle_x = buf.get_f32_le();
17464        __struct.angle_y = buf.get_f32_le();
17465        __struct.distance = buf.get_f32_le();
17466        __struct.size_x = buf.get_f32_le();
17467        __struct.size_y = buf.get_f32_le();
17468        __struct.target_num = buf.get_u8();
17469        let tmp = buf.get_u8();
17470        __struct.frame =
17471            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17472                enum_type: "MavFrame",
17473                value: tmp as u32,
17474            })?;
17475        __struct.x = buf.get_f32_le();
17476        __struct.y = buf.get_f32_le();
17477        __struct.z = buf.get_f32_le();
17478        for v in &mut __struct.q {
17479            let val = buf.get_f32_le();
17480            *v = val;
17481        }
17482        let tmp = buf.get_u8();
17483        __struct.mavtype =
17484            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17485                enum_type: "LandingTargetType",
17486                value: tmp as u32,
17487            })?;
17488        __struct.position_valid = buf.get_u8();
17489        Ok(__struct)
17490    }
17491    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17492        let mut __tmp = BytesMut::new(bytes);
17493        #[allow(clippy::absurd_extreme_comparisons)]
17494        #[allow(unused_comparisons)]
17495        if __tmp.remaining() < Self::ENCODED_LEN {
17496            panic!(
17497                "buffer is too small (need {} bytes, but got {})",
17498                Self::ENCODED_LEN,
17499                __tmp.remaining(),
17500            )
17501        }
17502        __tmp.put_u64_le(self.time_usec);
17503        __tmp.put_f32_le(self.angle_x);
17504        __tmp.put_f32_le(self.angle_y);
17505        __tmp.put_f32_le(self.distance);
17506        __tmp.put_f32_le(self.size_x);
17507        __tmp.put_f32_le(self.size_y);
17508        __tmp.put_u8(self.target_num);
17509        __tmp.put_u8(self.frame as u8);
17510        __tmp.put_f32_le(self.x);
17511        __tmp.put_f32_le(self.y);
17512        __tmp.put_f32_le(self.z);
17513        for val in &self.q {
17514            __tmp.put_f32_le(*val);
17515        }
17516        __tmp.put_u8(self.mavtype as u8);
17517        __tmp.put_u8(self.position_valid);
17518        if matches!(version, MavlinkVersion::V2) {
17519            let len = __tmp.len();
17520            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17521        } else {
17522            __tmp.len()
17523        }
17524    }
17525}
17526#[doc = "id: 8"]
17527#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17528#[derive(Debug, Clone, PartialEq)]
17529#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17530#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17531pub struct LINK_NODE_STATUS_DATA {
17532    #[doc = "Timestamp (time since system boot)."]
17533    pub timestamp: u64,
17534    #[doc = "Transmit rate"]
17535    pub tx_rate: u32,
17536    #[doc = "Receive rate"]
17537    pub rx_rate: u32,
17538    #[doc = "Messages sent"]
17539    pub messages_sent: u32,
17540    #[doc = "Messages received (estimated from counting seq)"]
17541    pub messages_received: u32,
17542    #[doc = "Messages lost (estimated from counting seq)"]
17543    pub messages_lost: u32,
17544    #[doc = "Number of bytes that could not be parsed correctly."]
17545    pub rx_parse_err: u16,
17546    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17547    pub tx_overflows: u16,
17548    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17549    pub rx_overflows: u16,
17550    #[doc = "Remaining free transmit buffer space"]
17551    pub tx_buf: u8,
17552    #[doc = "Remaining free receive buffer space"]
17553    pub rx_buf: u8,
17554}
17555impl LINK_NODE_STATUS_DATA {
17556    pub const ENCODED_LEN: usize = 36usize;
17557    pub const DEFAULT: Self = Self {
17558        timestamp: 0_u64,
17559        tx_rate: 0_u32,
17560        rx_rate: 0_u32,
17561        messages_sent: 0_u32,
17562        messages_received: 0_u32,
17563        messages_lost: 0_u32,
17564        rx_parse_err: 0_u16,
17565        tx_overflows: 0_u16,
17566        rx_overflows: 0_u16,
17567        tx_buf: 0_u8,
17568        rx_buf: 0_u8,
17569    };
17570    #[cfg(feature = "arbitrary")]
17571    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17572        use arbitrary::{Arbitrary, Unstructured};
17573        let mut buf = [0u8; 1024];
17574        rng.fill_bytes(&mut buf);
17575        let mut unstructured = Unstructured::new(&buf);
17576        Self::arbitrary(&mut unstructured).unwrap_or_default()
17577    }
17578}
17579impl Default for LINK_NODE_STATUS_DATA {
17580    fn default() -> Self {
17581        Self::DEFAULT.clone()
17582    }
17583}
17584impl MessageData for LINK_NODE_STATUS_DATA {
17585    type Message = MavMessage;
17586    const ID: u32 = 8u32;
17587    const NAME: &'static str = "LINK_NODE_STATUS";
17588    const EXTRA_CRC: u8 = 117u8;
17589    const ENCODED_LEN: usize = 36usize;
17590    fn deser(
17591        _version: MavlinkVersion,
17592        __input: &[u8],
17593    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17594        let avail_len = __input.len();
17595        let mut payload_buf = [0; Self::ENCODED_LEN];
17596        let mut buf = if avail_len < Self::ENCODED_LEN {
17597            payload_buf[0..avail_len].copy_from_slice(__input);
17598            Bytes::new(&payload_buf)
17599        } else {
17600            Bytes::new(__input)
17601        };
17602        let mut __struct = Self::default();
17603        __struct.timestamp = buf.get_u64_le();
17604        __struct.tx_rate = buf.get_u32_le();
17605        __struct.rx_rate = buf.get_u32_le();
17606        __struct.messages_sent = buf.get_u32_le();
17607        __struct.messages_received = buf.get_u32_le();
17608        __struct.messages_lost = buf.get_u32_le();
17609        __struct.rx_parse_err = buf.get_u16_le();
17610        __struct.tx_overflows = buf.get_u16_le();
17611        __struct.rx_overflows = buf.get_u16_le();
17612        __struct.tx_buf = buf.get_u8();
17613        __struct.rx_buf = buf.get_u8();
17614        Ok(__struct)
17615    }
17616    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17617        let mut __tmp = BytesMut::new(bytes);
17618        #[allow(clippy::absurd_extreme_comparisons)]
17619        #[allow(unused_comparisons)]
17620        if __tmp.remaining() < Self::ENCODED_LEN {
17621            panic!(
17622                "buffer is too small (need {} bytes, but got {})",
17623                Self::ENCODED_LEN,
17624                __tmp.remaining(),
17625            )
17626        }
17627        __tmp.put_u64_le(self.timestamp);
17628        __tmp.put_u32_le(self.tx_rate);
17629        __tmp.put_u32_le(self.rx_rate);
17630        __tmp.put_u32_le(self.messages_sent);
17631        __tmp.put_u32_le(self.messages_received);
17632        __tmp.put_u32_le(self.messages_lost);
17633        __tmp.put_u16_le(self.rx_parse_err);
17634        __tmp.put_u16_le(self.tx_overflows);
17635        __tmp.put_u16_le(self.rx_overflows);
17636        __tmp.put_u8(self.tx_buf);
17637        __tmp.put_u8(self.rx_buf);
17638        if matches!(version, MavlinkVersion::V2) {
17639            let len = __tmp.len();
17640            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17641        } else {
17642            __tmp.len()
17643        }
17644    }
17645}
17646#[doc = "id: 32"]
17647#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17648#[derive(Debug, Clone, PartialEq)]
17649#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17651pub struct LOCAL_POSITION_NED_DATA {
17652    #[doc = "Timestamp (time since system boot)."]
17653    pub time_boot_ms: u32,
17654    #[doc = "X Position"]
17655    pub x: f32,
17656    #[doc = "Y Position"]
17657    pub y: f32,
17658    #[doc = "Z Position"]
17659    pub z: f32,
17660    #[doc = "X Speed"]
17661    pub vx: f32,
17662    #[doc = "Y Speed"]
17663    pub vy: f32,
17664    #[doc = "Z Speed"]
17665    pub vz: f32,
17666}
17667impl LOCAL_POSITION_NED_DATA {
17668    pub const ENCODED_LEN: usize = 28usize;
17669    pub const DEFAULT: Self = Self {
17670        time_boot_ms: 0_u32,
17671        x: 0.0_f32,
17672        y: 0.0_f32,
17673        z: 0.0_f32,
17674        vx: 0.0_f32,
17675        vy: 0.0_f32,
17676        vz: 0.0_f32,
17677    };
17678    #[cfg(feature = "arbitrary")]
17679    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17680        use arbitrary::{Arbitrary, Unstructured};
17681        let mut buf = [0u8; 1024];
17682        rng.fill_bytes(&mut buf);
17683        let mut unstructured = Unstructured::new(&buf);
17684        Self::arbitrary(&mut unstructured).unwrap_or_default()
17685    }
17686}
17687impl Default for LOCAL_POSITION_NED_DATA {
17688    fn default() -> Self {
17689        Self::DEFAULT.clone()
17690    }
17691}
17692impl MessageData for LOCAL_POSITION_NED_DATA {
17693    type Message = MavMessage;
17694    const ID: u32 = 32u32;
17695    const NAME: &'static str = "LOCAL_POSITION_NED";
17696    const EXTRA_CRC: u8 = 185u8;
17697    const ENCODED_LEN: usize = 28usize;
17698    fn deser(
17699        _version: MavlinkVersion,
17700        __input: &[u8],
17701    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17702        let avail_len = __input.len();
17703        let mut payload_buf = [0; Self::ENCODED_LEN];
17704        let mut buf = if avail_len < Self::ENCODED_LEN {
17705            payload_buf[0..avail_len].copy_from_slice(__input);
17706            Bytes::new(&payload_buf)
17707        } else {
17708            Bytes::new(__input)
17709        };
17710        let mut __struct = Self::default();
17711        __struct.time_boot_ms = buf.get_u32_le();
17712        __struct.x = buf.get_f32_le();
17713        __struct.y = buf.get_f32_le();
17714        __struct.z = buf.get_f32_le();
17715        __struct.vx = buf.get_f32_le();
17716        __struct.vy = buf.get_f32_le();
17717        __struct.vz = buf.get_f32_le();
17718        Ok(__struct)
17719    }
17720    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17721        let mut __tmp = BytesMut::new(bytes);
17722        #[allow(clippy::absurd_extreme_comparisons)]
17723        #[allow(unused_comparisons)]
17724        if __tmp.remaining() < Self::ENCODED_LEN {
17725            panic!(
17726                "buffer is too small (need {} bytes, but got {})",
17727                Self::ENCODED_LEN,
17728                __tmp.remaining(),
17729            )
17730        }
17731        __tmp.put_u32_le(self.time_boot_ms);
17732        __tmp.put_f32_le(self.x);
17733        __tmp.put_f32_le(self.y);
17734        __tmp.put_f32_le(self.z);
17735        __tmp.put_f32_le(self.vx);
17736        __tmp.put_f32_le(self.vy);
17737        __tmp.put_f32_le(self.vz);
17738        if matches!(version, MavlinkVersion::V2) {
17739            let len = __tmp.len();
17740            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17741        } else {
17742            __tmp.len()
17743        }
17744    }
17745}
17746#[doc = "id: 64"]
17747#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17748#[derive(Debug, Clone, PartialEq)]
17749#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17751pub struct LOCAL_POSITION_NED_COV_DATA {
17752    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17753    pub time_usec: u64,
17754    #[doc = "X Position"]
17755    pub x: f32,
17756    #[doc = "Y Position"]
17757    pub y: f32,
17758    #[doc = "Z Position"]
17759    pub z: f32,
17760    #[doc = "X Speed"]
17761    pub vx: f32,
17762    #[doc = "Y Speed"]
17763    pub vy: f32,
17764    #[doc = "Z Speed"]
17765    pub vz: f32,
17766    #[doc = "X Acceleration"]
17767    pub ax: f32,
17768    #[doc = "Y Acceleration"]
17769    pub ay: f32,
17770    #[doc = "Z Acceleration"]
17771    pub az: f32,
17772    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17773    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17774    pub covariance: [f32; 45],
17775    #[doc = "Class id of the estimator this estimate originated from."]
17776    pub estimator_type: MavEstimatorType,
17777}
17778impl LOCAL_POSITION_NED_COV_DATA {
17779    pub const ENCODED_LEN: usize = 225usize;
17780    pub const DEFAULT: Self = Self {
17781        time_usec: 0_u64,
17782        x: 0.0_f32,
17783        y: 0.0_f32,
17784        z: 0.0_f32,
17785        vx: 0.0_f32,
17786        vy: 0.0_f32,
17787        vz: 0.0_f32,
17788        ax: 0.0_f32,
17789        ay: 0.0_f32,
17790        az: 0.0_f32,
17791        covariance: [0.0_f32; 45usize],
17792        estimator_type: MavEstimatorType::DEFAULT,
17793    };
17794    #[cfg(feature = "arbitrary")]
17795    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17796        use arbitrary::{Arbitrary, Unstructured};
17797        let mut buf = [0u8; 1024];
17798        rng.fill_bytes(&mut buf);
17799        let mut unstructured = Unstructured::new(&buf);
17800        Self::arbitrary(&mut unstructured).unwrap_or_default()
17801    }
17802}
17803impl Default for LOCAL_POSITION_NED_COV_DATA {
17804    fn default() -> Self {
17805        Self::DEFAULT.clone()
17806    }
17807}
17808impl MessageData for LOCAL_POSITION_NED_COV_DATA {
17809    type Message = MavMessage;
17810    const ID: u32 = 64u32;
17811    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
17812    const EXTRA_CRC: u8 = 191u8;
17813    const ENCODED_LEN: usize = 225usize;
17814    fn deser(
17815        _version: MavlinkVersion,
17816        __input: &[u8],
17817    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17818        let avail_len = __input.len();
17819        let mut payload_buf = [0; Self::ENCODED_LEN];
17820        let mut buf = if avail_len < Self::ENCODED_LEN {
17821            payload_buf[0..avail_len].copy_from_slice(__input);
17822            Bytes::new(&payload_buf)
17823        } else {
17824            Bytes::new(__input)
17825        };
17826        let mut __struct = Self::default();
17827        __struct.time_usec = buf.get_u64_le();
17828        __struct.x = buf.get_f32_le();
17829        __struct.y = buf.get_f32_le();
17830        __struct.z = buf.get_f32_le();
17831        __struct.vx = buf.get_f32_le();
17832        __struct.vy = buf.get_f32_le();
17833        __struct.vz = buf.get_f32_le();
17834        __struct.ax = buf.get_f32_le();
17835        __struct.ay = buf.get_f32_le();
17836        __struct.az = buf.get_f32_le();
17837        for v in &mut __struct.covariance {
17838            let val = buf.get_f32_le();
17839            *v = val;
17840        }
17841        let tmp = buf.get_u8();
17842        __struct.estimator_type =
17843            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17844                enum_type: "MavEstimatorType",
17845                value: tmp as u32,
17846            })?;
17847        Ok(__struct)
17848    }
17849    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17850        let mut __tmp = BytesMut::new(bytes);
17851        #[allow(clippy::absurd_extreme_comparisons)]
17852        #[allow(unused_comparisons)]
17853        if __tmp.remaining() < Self::ENCODED_LEN {
17854            panic!(
17855                "buffer is too small (need {} bytes, but got {})",
17856                Self::ENCODED_LEN,
17857                __tmp.remaining(),
17858            )
17859        }
17860        __tmp.put_u64_le(self.time_usec);
17861        __tmp.put_f32_le(self.x);
17862        __tmp.put_f32_le(self.y);
17863        __tmp.put_f32_le(self.z);
17864        __tmp.put_f32_le(self.vx);
17865        __tmp.put_f32_le(self.vy);
17866        __tmp.put_f32_le(self.vz);
17867        __tmp.put_f32_le(self.ax);
17868        __tmp.put_f32_le(self.ay);
17869        __tmp.put_f32_le(self.az);
17870        for val in &self.covariance {
17871            __tmp.put_f32_le(*val);
17872        }
17873        __tmp.put_u8(self.estimator_type as u8);
17874        if matches!(version, MavlinkVersion::V2) {
17875            let len = __tmp.len();
17876            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17877        } else {
17878            __tmp.len()
17879        }
17880    }
17881}
17882#[doc = "id: 89"]
17883#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17884#[derive(Debug, Clone, PartialEq)]
17885#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17886#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17887pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17888    #[doc = "Timestamp (time since system boot)."]
17889    pub time_boot_ms: u32,
17890    #[doc = "X Position"]
17891    pub x: f32,
17892    #[doc = "Y Position"]
17893    pub y: f32,
17894    #[doc = "Z Position"]
17895    pub z: f32,
17896    #[doc = "Roll"]
17897    pub roll: f32,
17898    #[doc = "Pitch"]
17899    pub pitch: f32,
17900    #[doc = "Yaw"]
17901    pub yaw: f32,
17902}
17903impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17904    pub const ENCODED_LEN: usize = 28usize;
17905    pub const DEFAULT: Self = Self {
17906        time_boot_ms: 0_u32,
17907        x: 0.0_f32,
17908        y: 0.0_f32,
17909        z: 0.0_f32,
17910        roll: 0.0_f32,
17911        pitch: 0.0_f32,
17912        yaw: 0.0_f32,
17913    };
17914    #[cfg(feature = "arbitrary")]
17915    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17916        use arbitrary::{Arbitrary, Unstructured};
17917        let mut buf = [0u8; 1024];
17918        rng.fill_bytes(&mut buf);
17919        let mut unstructured = Unstructured::new(&buf);
17920        Self::arbitrary(&mut unstructured).unwrap_or_default()
17921    }
17922}
17923impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17924    fn default() -> Self {
17925        Self::DEFAULT.clone()
17926    }
17927}
17928impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17929    type Message = MavMessage;
17930    const ID: u32 = 89u32;
17931    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
17932    const EXTRA_CRC: u8 = 231u8;
17933    const ENCODED_LEN: usize = 28usize;
17934    fn deser(
17935        _version: MavlinkVersion,
17936        __input: &[u8],
17937    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17938        let avail_len = __input.len();
17939        let mut payload_buf = [0; Self::ENCODED_LEN];
17940        let mut buf = if avail_len < Self::ENCODED_LEN {
17941            payload_buf[0..avail_len].copy_from_slice(__input);
17942            Bytes::new(&payload_buf)
17943        } else {
17944            Bytes::new(__input)
17945        };
17946        let mut __struct = Self::default();
17947        __struct.time_boot_ms = buf.get_u32_le();
17948        __struct.x = buf.get_f32_le();
17949        __struct.y = buf.get_f32_le();
17950        __struct.z = buf.get_f32_le();
17951        __struct.roll = buf.get_f32_le();
17952        __struct.pitch = buf.get_f32_le();
17953        __struct.yaw = buf.get_f32_le();
17954        Ok(__struct)
17955    }
17956    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17957        let mut __tmp = BytesMut::new(bytes);
17958        #[allow(clippy::absurd_extreme_comparisons)]
17959        #[allow(unused_comparisons)]
17960        if __tmp.remaining() < Self::ENCODED_LEN {
17961            panic!(
17962                "buffer is too small (need {} bytes, but got {})",
17963                Self::ENCODED_LEN,
17964                __tmp.remaining(),
17965            )
17966        }
17967        __tmp.put_u32_le(self.time_boot_ms);
17968        __tmp.put_f32_le(self.x);
17969        __tmp.put_f32_le(self.y);
17970        __tmp.put_f32_le(self.z);
17971        __tmp.put_f32_le(self.roll);
17972        __tmp.put_f32_le(self.pitch);
17973        __tmp.put_f32_le(self.yaw);
17974        if matches!(version, MavlinkVersion::V2) {
17975            let len = __tmp.len();
17976            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17977        } else {
17978            __tmp.len()
17979        }
17980    }
17981}
17982#[doc = "id: 268"]
17983#[doc = "An ack for a LOGGING_DATA_ACKED message."]
17984#[derive(Debug, Clone, PartialEq)]
17985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17986#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17987pub struct LOGGING_ACK_DATA {
17988    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
17989    pub sequence: u16,
17990    #[doc = "system ID of the target"]
17991    pub target_system: u8,
17992    #[doc = "component ID of the target"]
17993    pub target_component: u8,
17994}
17995impl LOGGING_ACK_DATA {
17996    pub const ENCODED_LEN: usize = 4usize;
17997    pub const DEFAULT: Self = Self {
17998        sequence: 0_u16,
17999        target_system: 0_u8,
18000        target_component: 0_u8,
18001    };
18002    #[cfg(feature = "arbitrary")]
18003    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18004        use arbitrary::{Arbitrary, Unstructured};
18005        let mut buf = [0u8; 1024];
18006        rng.fill_bytes(&mut buf);
18007        let mut unstructured = Unstructured::new(&buf);
18008        Self::arbitrary(&mut unstructured).unwrap_or_default()
18009    }
18010}
18011impl Default for LOGGING_ACK_DATA {
18012    fn default() -> Self {
18013        Self::DEFAULT.clone()
18014    }
18015}
18016impl MessageData for LOGGING_ACK_DATA {
18017    type Message = MavMessage;
18018    const ID: u32 = 268u32;
18019    const NAME: &'static str = "LOGGING_ACK";
18020    const EXTRA_CRC: u8 = 14u8;
18021    const ENCODED_LEN: usize = 4usize;
18022    fn deser(
18023        _version: MavlinkVersion,
18024        __input: &[u8],
18025    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18026        let avail_len = __input.len();
18027        let mut payload_buf = [0; Self::ENCODED_LEN];
18028        let mut buf = if avail_len < Self::ENCODED_LEN {
18029            payload_buf[0..avail_len].copy_from_slice(__input);
18030            Bytes::new(&payload_buf)
18031        } else {
18032            Bytes::new(__input)
18033        };
18034        let mut __struct = Self::default();
18035        __struct.sequence = buf.get_u16_le();
18036        __struct.target_system = buf.get_u8();
18037        __struct.target_component = buf.get_u8();
18038        Ok(__struct)
18039    }
18040    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18041        let mut __tmp = BytesMut::new(bytes);
18042        #[allow(clippy::absurd_extreme_comparisons)]
18043        #[allow(unused_comparisons)]
18044        if __tmp.remaining() < Self::ENCODED_LEN {
18045            panic!(
18046                "buffer is too small (need {} bytes, but got {})",
18047                Self::ENCODED_LEN,
18048                __tmp.remaining(),
18049            )
18050        }
18051        __tmp.put_u16_le(self.sequence);
18052        __tmp.put_u8(self.target_system);
18053        __tmp.put_u8(self.target_component);
18054        if matches!(version, MavlinkVersion::V2) {
18055            let len = __tmp.len();
18056            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18057        } else {
18058            __tmp.len()
18059        }
18060    }
18061}
18062#[doc = "id: 266"]
18063#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18064#[derive(Debug, Clone, PartialEq)]
18065#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18066#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18067pub struct LOGGING_DATA_DATA {
18068    #[doc = "sequence number (can wrap)"]
18069    pub sequence: u16,
18070    #[doc = "system ID of the target"]
18071    pub target_system: u8,
18072    #[doc = "component ID of the target"]
18073    pub target_component: u8,
18074    #[doc = "data length"]
18075    pub length: u8,
18076    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18077    pub first_message_offset: u8,
18078    #[doc = "logged data"]
18079    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18080    pub data: [u8; 249],
18081}
18082impl LOGGING_DATA_DATA {
18083    pub const ENCODED_LEN: usize = 255usize;
18084    pub const DEFAULT: Self = Self {
18085        sequence: 0_u16,
18086        target_system: 0_u8,
18087        target_component: 0_u8,
18088        length: 0_u8,
18089        first_message_offset: 0_u8,
18090        data: [0_u8; 249usize],
18091    };
18092    #[cfg(feature = "arbitrary")]
18093    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18094        use arbitrary::{Arbitrary, Unstructured};
18095        let mut buf = [0u8; 1024];
18096        rng.fill_bytes(&mut buf);
18097        let mut unstructured = Unstructured::new(&buf);
18098        Self::arbitrary(&mut unstructured).unwrap_or_default()
18099    }
18100}
18101impl Default for LOGGING_DATA_DATA {
18102    fn default() -> Self {
18103        Self::DEFAULT.clone()
18104    }
18105}
18106impl MessageData for LOGGING_DATA_DATA {
18107    type Message = MavMessage;
18108    const ID: u32 = 266u32;
18109    const NAME: &'static str = "LOGGING_DATA";
18110    const EXTRA_CRC: u8 = 193u8;
18111    const ENCODED_LEN: usize = 255usize;
18112    fn deser(
18113        _version: MavlinkVersion,
18114        __input: &[u8],
18115    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18116        let avail_len = __input.len();
18117        let mut payload_buf = [0; Self::ENCODED_LEN];
18118        let mut buf = if avail_len < Self::ENCODED_LEN {
18119            payload_buf[0..avail_len].copy_from_slice(__input);
18120            Bytes::new(&payload_buf)
18121        } else {
18122            Bytes::new(__input)
18123        };
18124        let mut __struct = Self::default();
18125        __struct.sequence = buf.get_u16_le();
18126        __struct.target_system = buf.get_u8();
18127        __struct.target_component = buf.get_u8();
18128        __struct.length = buf.get_u8();
18129        __struct.first_message_offset = buf.get_u8();
18130        for v in &mut __struct.data {
18131            let val = buf.get_u8();
18132            *v = val;
18133        }
18134        Ok(__struct)
18135    }
18136    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18137        let mut __tmp = BytesMut::new(bytes);
18138        #[allow(clippy::absurd_extreme_comparisons)]
18139        #[allow(unused_comparisons)]
18140        if __tmp.remaining() < Self::ENCODED_LEN {
18141            panic!(
18142                "buffer is too small (need {} bytes, but got {})",
18143                Self::ENCODED_LEN,
18144                __tmp.remaining(),
18145            )
18146        }
18147        __tmp.put_u16_le(self.sequence);
18148        __tmp.put_u8(self.target_system);
18149        __tmp.put_u8(self.target_component);
18150        __tmp.put_u8(self.length);
18151        __tmp.put_u8(self.first_message_offset);
18152        for val in &self.data {
18153            __tmp.put_u8(*val);
18154        }
18155        if matches!(version, MavlinkVersion::V2) {
18156            let len = __tmp.len();
18157            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18158        } else {
18159            __tmp.len()
18160        }
18161    }
18162}
18163#[doc = "id: 267"]
18164#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18165#[derive(Debug, Clone, PartialEq)]
18166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18168pub struct LOGGING_DATA_ACKED_DATA {
18169    #[doc = "sequence number (can wrap)"]
18170    pub sequence: u16,
18171    #[doc = "system ID of the target"]
18172    pub target_system: u8,
18173    #[doc = "component ID of the target"]
18174    pub target_component: u8,
18175    #[doc = "data length"]
18176    pub length: u8,
18177    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18178    pub first_message_offset: u8,
18179    #[doc = "logged data"]
18180    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18181    pub data: [u8; 249],
18182}
18183impl LOGGING_DATA_ACKED_DATA {
18184    pub const ENCODED_LEN: usize = 255usize;
18185    pub const DEFAULT: Self = Self {
18186        sequence: 0_u16,
18187        target_system: 0_u8,
18188        target_component: 0_u8,
18189        length: 0_u8,
18190        first_message_offset: 0_u8,
18191        data: [0_u8; 249usize],
18192    };
18193    #[cfg(feature = "arbitrary")]
18194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18195        use arbitrary::{Arbitrary, Unstructured};
18196        let mut buf = [0u8; 1024];
18197        rng.fill_bytes(&mut buf);
18198        let mut unstructured = Unstructured::new(&buf);
18199        Self::arbitrary(&mut unstructured).unwrap_or_default()
18200    }
18201}
18202impl Default for LOGGING_DATA_ACKED_DATA {
18203    fn default() -> Self {
18204        Self::DEFAULT.clone()
18205    }
18206}
18207impl MessageData for LOGGING_DATA_ACKED_DATA {
18208    type Message = MavMessage;
18209    const ID: u32 = 267u32;
18210    const NAME: &'static str = "LOGGING_DATA_ACKED";
18211    const EXTRA_CRC: u8 = 35u8;
18212    const ENCODED_LEN: usize = 255usize;
18213    fn deser(
18214        _version: MavlinkVersion,
18215        __input: &[u8],
18216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18217        let avail_len = __input.len();
18218        let mut payload_buf = [0; Self::ENCODED_LEN];
18219        let mut buf = if avail_len < Self::ENCODED_LEN {
18220            payload_buf[0..avail_len].copy_from_slice(__input);
18221            Bytes::new(&payload_buf)
18222        } else {
18223            Bytes::new(__input)
18224        };
18225        let mut __struct = Self::default();
18226        __struct.sequence = buf.get_u16_le();
18227        __struct.target_system = buf.get_u8();
18228        __struct.target_component = buf.get_u8();
18229        __struct.length = buf.get_u8();
18230        __struct.first_message_offset = buf.get_u8();
18231        for v in &mut __struct.data {
18232            let val = buf.get_u8();
18233            *v = val;
18234        }
18235        Ok(__struct)
18236    }
18237    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18238        let mut __tmp = BytesMut::new(bytes);
18239        #[allow(clippy::absurd_extreme_comparisons)]
18240        #[allow(unused_comparisons)]
18241        if __tmp.remaining() < Self::ENCODED_LEN {
18242            panic!(
18243                "buffer is too small (need {} bytes, but got {})",
18244                Self::ENCODED_LEN,
18245                __tmp.remaining(),
18246            )
18247        }
18248        __tmp.put_u16_le(self.sequence);
18249        __tmp.put_u8(self.target_system);
18250        __tmp.put_u8(self.target_component);
18251        __tmp.put_u8(self.length);
18252        __tmp.put_u8(self.first_message_offset);
18253        for val in &self.data {
18254            __tmp.put_u8(*val);
18255        }
18256        if matches!(version, MavlinkVersion::V2) {
18257            let len = __tmp.len();
18258            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18259        } else {
18260            __tmp.len()
18261        }
18262    }
18263}
18264#[doc = "id: 120"]
18265#[doc = "Reply to LOG_REQUEST_DATA."]
18266#[derive(Debug, Clone, PartialEq)]
18267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18268#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18269pub struct LOG_DATA_DATA {
18270    #[doc = "Offset into the log"]
18271    pub ofs: u32,
18272    #[doc = "Log id (from LOG_ENTRY reply)"]
18273    pub id: u16,
18274    #[doc = "Number of bytes (zero for end of log)"]
18275    pub count: u8,
18276    #[doc = "log data"]
18277    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18278    pub data: [u8; 90],
18279}
18280impl LOG_DATA_DATA {
18281    pub const ENCODED_LEN: usize = 97usize;
18282    pub const DEFAULT: Self = Self {
18283        ofs: 0_u32,
18284        id: 0_u16,
18285        count: 0_u8,
18286        data: [0_u8; 90usize],
18287    };
18288    #[cfg(feature = "arbitrary")]
18289    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18290        use arbitrary::{Arbitrary, Unstructured};
18291        let mut buf = [0u8; 1024];
18292        rng.fill_bytes(&mut buf);
18293        let mut unstructured = Unstructured::new(&buf);
18294        Self::arbitrary(&mut unstructured).unwrap_or_default()
18295    }
18296}
18297impl Default for LOG_DATA_DATA {
18298    fn default() -> Self {
18299        Self::DEFAULT.clone()
18300    }
18301}
18302impl MessageData for LOG_DATA_DATA {
18303    type Message = MavMessage;
18304    const ID: u32 = 120u32;
18305    const NAME: &'static str = "LOG_DATA";
18306    const EXTRA_CRC: u8 = 134u8;
18307    const ENCODED_LEN: usize = 97usize;
18308    fn deser(
18309        _version: MavlinkVersion,
18310        __input: &[u8],
18311    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18312        let avail_len = __input.len();
18313        let mut payload_buf = [0; Self::ENCODED_LEN];
18314        let mut buf = if avail_len < Self::ENCODED_LEN {
18315            payload_buf[0..avail_len].copy_from_slice(__input);
18316            Bytes::new(&payload_buf)
18317        } else {
18318            Bytes::new(__input)
18319        };
18320        let mut __struct = Self::default();
18321        __struct.ofs = buf.get_u32_le();
18322        __struct.id = buf.get_u16_le();
18323        __struct.count = buf.get_u8();
18324        for v in &mut __struct.data {
18325            let val = buf.get_u8();
18326            *v = val;
18327        }
18328        Ok(__struct)
18329    }
18330    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18331        let mut __tmp = BytesMut::new(bytes);
18332        #[allow(clippy::absurd_extreme_comparisons)]
18333        #[allow(unused_comparisons)]
18334        if __tmp.remaining() < Self::ENCODED_LEN {
18335            panic!(
18336                "buffer is too small (need {} bytes, but got {})",
18337                Self::ENCODED_LEN,
18338                __tmp.remaining(),
18339            )
18340        }
18341        __tmp.put_u32_le(self.ofs);
18342        __tmp.put_u16_le(self.id);
18343        __tmp.put_u8(self.count);
18344        for val in &self.data {
18345            __tmp.put_u8(*val);
18346        }
18347        if matches!(version, MavlinkVersion::V2) {
18348            let len = __tmp.len();
18349            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18350        } else {
18351            __tmp.len()
18352        }
18353    }
18354}
18355#[doc = "id: 118"]
18356#[doc = "Reply to LOG_REQUEST_LIST."]
18357#[derive(Debug, Clone, PartialEq)]
18358#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18359#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18360pub struct LOG_ENTRY_DATA {
18361    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18362    pub time_utc: u32,
18363    #[doc = "Size of the log (may be approximate)"]
18364    pub size: u32,
18365    #[doc = "Log id"]
18366    pub id: u16,
18367    #[doc = "Total number of logs"]
18368    pub num_logs: u16,
18369    #[doc = "High log number"]
18370    pub last_log_num: u16,
18371}
18372impl LOG_ENTRY_DATA {
18373    pub const ENCODED_LEN: usize = 14usize;
18374    pub const DEFAULT: Self = Self {
18375        time_utc: 0_u32,
18376        size: 0_u32,
18377        id: 0_u16,
18378        num_logs: 0_u16,
18379        last_log_num: 0_u16,
18380    };
18381    #[cfg(feature = "arbitrary")]
18382    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18383        use arbitrary::{Arbitrary, Unstructured};
18384        let mut buf = [0u8; 1024];
18385        rng.fill_bytes(&mut buf);
18386        let mut unstructured = Unstructured::new(&buf);
18387        Self::arbitrary(&mut unstructured).unwrap_or_default()
18388    }
18389}
18390impl Default for LOG_ENTRY_DATA {
18391    fn default() -> Self {
18392        Self::DEFAULT.clone()
18393    }
18394}
18395impl MessageData for LOG_ENTRY_DATA {
18396    type Message = MavMessage;
18397    const ID: u32 = 118u32;
18398    const NAME: &'static str = "LOG_ENTRY";
18399    const EXTRA_CRC: u8 = 56u8;
18400    const ENCODED_LEN: usize = 14usize;
18401    fn deser(
18402        _version: MavlinkVersion,
18403        __input: &[u8],
18404    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18405        let avail_len = __input.len();
18406        let mut payload_buf = [0; Self::ENCODED_LEN];
18407        let mut buf = if avail_len < Self::ENCODED_LEN {
18408            payload_buf[0..avail_len].copy_from_slice(__input);
18409            Bytes::new(&payload_buf)
18410        } else {
18411            Bytes::new(__input)
18412        };
18413        let mut __struct = Self::default();
18414        __struct.time_utc = buf.get_u32_le();
18415        __struct.size = buf.get_u32_le();
18416        __struct.id = buf.get_u16_le();
18417        __struct.num_logs = buf.get_u16_le();
18418        __struct.last_log_num = buf.get_u16_le();
18419        Ok(__struct)
18420    }
18421    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18422        let mut __tmp = BytesMut::new(bytes);
18423        #[allow(clippy::absurd_extreme_comparisons)]
18424        #[allow(unused_comparisons)]
18425        if __tmp.remaining() < Self::ENCODED_LEN {
18426            panic!(
18427                "buffer is too small (need {} bytes, but got {})",
18428                Self::ENCODED_LEN,
18429                __tmp.remaining(),
18430            )
18431        }
18432        __tmp.put_u32_le(self.time_utc);
18433        __tmp.put_u32_le(self.size);
18434        __tmp.put_u16_le(self.id);
18435        __tmp.put_u16_le(self.num_logs);
18436        __tmp.put_u16_le(self.last_log_num);
18437        if matches!(version, MavlinkVersion::V2) {
18438            let len = __tmp.len();
18439            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18440        } else {
18441            __tmp.len()
18442        }
18443    }
18444}
18445#[doc = "id: 121"]
18446#[doc = "Erase all logs."]
18447#[derive(Debug, Clone, PartialEq)]
18448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18450pub struct LOG_ERASE_DATA {
18451    #[doc = "System ID"]
18452    pub target_system: u8,
18453    #[doc = "Component ID"]
18454    pub target_component: u8,
18455}
18456impl LOG_ERASE_DATA {
18457    pub const ENCODED_LEN: usize = 2usize;
18458    pub const DEFAULT: Self = Self {
18459        target_system: 0_u8,
18460        target_component: 0_u8,
18461    };
18462    #[cfg(feature = "arbitrary")]
18463    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18464        use arbitrary::{Arbitrary, Unstructured};
18465        let mut buf = [0u8; 1024];
18466        rng.fill_bytes(&mut buf);
18467        let mut unstructured = Unstructured::new(&buf);
18468        Self::arbitrary(&mut unstructured).unwrap_or_default()
18469    }
18470}
18471impl Default for LOG_ERASE_DATA {
18472    fn default() -> Self {
18473        Self::DEFAULT.clone()
18474    }
18475}
18476impl MessageData for LOG_ERASE_DATA {
18477    type Message = MavMessage;
18478    const ID: u32 = 121u32;
18479    const NAME: &'static str = "LOG_ERASE";
18480    const EXTRA_CRC: u8 = 237u8;
18481    const ENCODED_LEN: usize = 2usize;
18482    fn deser(
18483        _version: MavlinkVersion,
18484        __input: &[u8],
18485    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18486        let avail_len = __input.len();
18487        let mut payload_buf = [0; Self::ENCODED_LEN];
18488        let mut buf = if avail_len < Self::ENCODED_LEN {
18489            payload_buf[0..avail_len].copy_from_slice(__input);
18490            Bytes::new(&payload_buf)
18491        } else {
18492            Bytes::new(__input)
18493        };
18494        let mut __struct = Self::default();
18495        __struct.target_system = buf.get_u8();
18496        __struct.target_component = buf.get_u8();
18497        Ok(__struct)
18498    }
18499    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18500        let mut __tmp = BytesMut::new(bytes);
18501        #[allow(clippy::absurd_extreme_comparisons)]
18502        #[allow(unused_comparisons)]
18503        if __tmp.remaining() < Self::ENCODED_LEN {
18504            panic!(
18505                "buffer is too small (need {} bytes, but got {})",
18506                Self::ENCODED_LEN,
18507                __tmp.remaining(),
18508            )
18509        }
18510        __tmp.put_u8(self.target_system);
18511        __tmp.put_u8(self.target_component);
18512        if matches!(version, MavlinkVersion::V2) {
18513            let len = __tmp.len();
18514            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18515        } else {
18516            __tmp.len()
18517        }
18518    }
18519}
18520#[doc = "id: 119"]
18521#[doc = "Request a chunk of a log."]
18522#[derive(Debug, Clone, PartialEq)]
18523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18525pub struct LOG_REQUEST_DATA_DATA {
18526    #[doc = "Offset into the log"]
18527    pub ofs: u32,
18528    #[doc = "Number of bytes"]
18529    pub count: u32,
18530    #[doc = "Log id (from LOG_ENTRY reply)"]
18531    pub id: u16,
18532    #[doc = "System ID"]
18533    pub target_system: u8,
18534    #[doc = "Component ID"]
18535    pub target_component: u8,
18536}
18537impl LOG_REQUEST_DATA_DATA {
18538    pub const ENCODED_LEN: usize = 12usize;
18539    pub const DEFAULT: Self = Self {
18540        ofs: 0_u32,
18541        count: 0_u32,
18542        id: 0_u16,
18543        target_system: 0_u8,
18544        target_component: 0_u8,
18545    };
18546    #[cfg(feature = "arbitrary")]
18547    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18548        use arbitrary::{Arbitrary, Unstructured};
18549        let mut buf = [0u8; 1024];
18550        rng.fill_bytes(&mut buf);
18551        let mut unstructured = Unstructured::new(&buf);
18552        Self::arbitrary(&mut unstructured).unwrap_or_default()
18553    }
18554}
18555impl Default for LOG_REQUEST_DATA_DATA {
18556    fn default() -> Self {
18557        Self::DEFAULT.clone()
18558    }
18559}
18560impl MessageData for LOG_REQUEST_DATA_DATA {
18561    type Message = MavMessage;
18562    const ID: u32 = 119u32;
18563    const NAME: &'static str = "LOG_REQUEST_DATA";
18564    const EXTRA_CRC: u8 = 116u8;
18565    const ENCODED_LEN: usize = 12usize;
18566    fn deser(
18567        _version: MavlinkVersion,
18568        __input: &[u8],
18569    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18570        let avail_len = __input.len();
18571        let mut payload_buf = [0; Self::ENCODED_LEN];
18572        let mut buf = if avail_len < Self::ENCODED_LEN {
18573            payload_buf[0..avail_len].copy_from_slice(__input);
18574            Bytes::new(&payload_buf)
18575        } else {
18576            Bytes::new(__input)
18577        };
18578        let mut __struct = Self::default();
18579        __struct.ofs = buf.get_u32_le();
18580        __struct.count = buf.get_u32_le();
18581        __struct.id = buf.get_u16_le();
18582        __struct.target_system = buf.get_u8();
18583        __struct.target_component = buf.get_u8();
18584        Ok(__struct)
18585    }
18586    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18587        let mut __tmp = BytesMut::new(bytes);
18588        #[allow(clippy::absurd_extreme_comparisons)]
18589        #[allow(unused_comparisons)]
18590        if __tmp.remaining() < Self::ENCODED_LEN {
18591            panic!(
18592                "buffer is too small (need {} bytes, but got {})",
18593                Self::ENCODED_LEN,
18594                __tmp.remaining(),
18595            )
18596        }
18597        __tmp.put_u32_le(self.ofs);
18598        __tmp.put_u32_le(self.count);
18599        __tmp.put_u16_le(self.id);
18600        __tmp.put_u8(self.target_system);
18601        __tmp.put_u8(self.target_component);
18602        if matches!(version, MavlinkVersion::V2) {
18603            let len = __tmp.len();
18604            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18605        } else {
18606            __tmp.len()
18607        }
18608    }
18609}
18610#[doc = "id: 122"]
18611#[doc = "Stop log transfer and resume normal logging."]
18612#[derive(Debug, Clone, PartialEq)]
18613#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18614#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18615pub struct LOG_REQUEST_END_DATA {
18616    #[doc = "System ID"]
18617    pub target_system: u8,
18618    #[doc = "Component ID"]
18619    pub target_component: u8,
18620}
18621impl LOG_REQUEST_END_DATA {
18622    pub const ENCODED_LEN: usize = 2usize;
18623    pub const DEFAULT: Self = Self {
18624        target_system: 0_u8,
18625        target_component: 0_u8,
18626    };
18627    #[cfg(feature = "arbitrary")]
18628    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18629        use arbitrary::{Arbitrary, Unstructured};
18630        let mut buf = [0u8; 1024];
18631        rng.fill_bytes(&mut buf);
18632        let mut unstructured = Unstructured::new(&buf);
18633        Self::arbitrary(&mut unstructured).unwrap_or_default()
18634    }
18635}
18636impl Default for LOG_REQUEST_END_DATA {
18637    fn default() -> Self {
18638        Self::DEFAULT.clone()
18639    }
18640}
18641impl MessageData for LOG_REQUEST_END_DATA {
18642    type Message = MavMessage;
18643    const ID: u32 = 122u32;
18644    const NAME: &'static str = "LOG_REQUEST_END";
18645    const EXTRA_CRC: u8 = 203u8;
18646    const ENCODED_LEN: usize = 2usize;
18647    fn deser(
18648        _version: MavlinkVersion,
18649        __input: &[u8],
18650    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18651        let avail_len = __input.len();
18652        let mut payload_buf = [0; Self::ENCODED_LEN];
18653        let mut buf = if avail_len < Self::ENCODED_LEN {
18654            payload_buf[0..avail_len].copy_from_slice(__input);
18655            Bytes::new(&payload_buf)
18656        } else {
18657            Bytes::new(__input)
18658        };
18659        let mut __struct = Self::default();
18660        __struct.target_system = buf.get_u8();
18661        __struct.target_component = buf.get_u8();
18662        Ok(__struct)
18663    }
18664    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18665        let mut __tmp = BytesMut::new(bytes);
18666        #[allow(clippy::absurd_extreme_comparisons)]
18667        #[allow(unused_comparisons)]
18668        if __tmp.remaining() < Self::ENCODED_LEN {
18669            panic!(
18670                "buffer is too small (need {} bytes, but got {})",
18671                Self::ENCODED_LEN,
18672                __tmp.remaining(),
18673            )
18674        }
18675        __tmp.put_u8(self.target_system);
18676        __tmp.put_u8(self.target_component);
18677        if matches!(version, MavlinkVersion::V2) {
18678            let len = __tmp.len();
18679            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18680        } else {
18681            __tmp.len()
18682        }
18683    }
18684}
18685#[doc = "id: 117"]
18686#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18687#[derive(Debug, Clone, PartialEq)]
18688#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18689#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18690pub struct LOG_REQUEST_LIST_DATA {
18691    #[doc = "First log id (0 for first available)"]
18692    pub start: u16,
18693    #[doc = "Last log id (0xffff for last available)"]
18694    pub end: u16,
18695    #[doc = "System ID"]
18696    pub target_system: u8,
18697    #[doc = "Component ID"]
18698    pub target_component: u8,
18699}
18700impl LOG_REQUEST_LIST_DATA {
18701    pub const ENCODED_LEN: usize = 6usize;
18702    pub const DEFAULT: Self = Self {
18703        start: 0_u16,
18704        end: 0_u16,
18705        target_system: 0_u8,
18706        target_component: 0_u8,
18707    };
18708    #[cfg(feature = "arbitrary")]
18709    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18710        use arbitrary::{Arbitrary, Unstructured};
18711        let mut buf = [0u8; 1024];
18712        rng.fill_bytes(&mut buf);
18713        let mut unstructured = Unstructured::new(&buf);
18714        Self::arbitrary(&mut unstructured).unwrap_or_default()
18715    }
18716}
18717impl Default for LOG_REQUEST_LIST_DATA {
18718    fn default() -> Self {
18719        Self::DEFAULT.clone()
18720    }
18721}
18722impl MessageData for LOG_REQUEST_LIST_DATA {
18723    type Message = MavMessage;
18724    const ID: u32 = 117u32;
18725    const NAME: &'static str = "LOG_REQUEST_LIST";
18726    const EXTRA_CRC: u8 = 128u8;
18727    const ENCODED_LEN: usize = 6usize;
18728    fn deser(
18729        _version: MavlinkVersion,
18730        __input: &[u8],
18731    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18732        let avail_len = __input.len();
18733        let mut payload_buf = [0; Self::ENCODED_LEN];
18734        let mut buf = if avail_len < Self::ENCODED_LEN {
18735            payload_buf[0..avail_len].copy_from_slice(__input);
18736            Bytes::new(&payload_buf)
18737        } else {
18738            Bytes::new(__input)
18739        };
18740        let mut __struct = Self::default();
18741        __struct.start = buf.get_u16_le();
18742        __struct.end = buf.get_u16_le();
18743        __struct.target_system = buf.get_u8();
18744        __struct.target_component = buf.get_u8();
18745        Ok(__struct)
18746    }
18747    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18748        let mut __tmp = BytesMut::new(bytes);
18749        #[allow(clippy::absurd_extreme_comparisons)]
18750        #[allow(unused_comparisons)]
18751        if __tmp.remaining() < Self::ENCODED_LEN {
18752            panic!(
18753                "buffer is too small (need {} bytes, but got {})",
18754                Self::ENCODED_LEN,
18755                __tmp.remaining(),
18756            )
18757        }
18758        __tmp.put_u16_le(self.start);
18759        __tmp.put_u16_le(self.end);
18760        __tmp.put_u8(self.target_system);
18761        __tmp.put_u8(self.target_component);
18762        if matches!(version, MavlinkVersion::V2) {
18763            let len = __tmp.len();
18764            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18765        } else {
18766            __tmp.len()
18767        }
18768    }
18769}
18770#[doc = "id: 192"]
18771#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
18772#[derive(Debug, Clone, PartialEq)]
18773#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18774#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18775pub struct MAG_CAL_REPORT_DATA {
18776    #[doc = "RMS milligauss residuals."]
18777    pub fitness: f32,
18778    #[doc = "X offset."]
18779    pub ofs_x: f32,
18780    #[doc = "Y offset."]
18781    pub ofs_y: f32,
18782    #[doc = "Z offset."]
18783    pub ofs_z: f32,
18784    #[doc = "X diagonal (matrix 11)."]
18785    pub diag_x: f32,
18786    #[doc = "Y diagonal (matrix 22)."]
18787    pub diag_y: f32,
18788    #[doc = "Z diagonal (matrix 33)."]
18789    pub diag_z: f32,
18790    #[doc = "X off-diagonal (matrix 12 and 21)."]
18791    pub offdiag_x: f32,
18792    #[doc = "Y off-diagonal (matrix 13 and 31)."]
18793    pub offdiag_y: f32,
18794    #[doc = "Z off-diagonal (matrix 32 and 23)."]
18795    pub offdiag_z: f32,
18796    #[doc = "Compass being calibrated."]
18797    pub compass_id: u8,
18798    #[doc = "Bitmask of compasses being calibrated."]
18799    pub cal_mask: u8,
18800    #[doc = "Calibration Status."]
18801    pub cal_status: MagCalStatus,
18802    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
18803    pub autosaved: u8,
18804    #[doc = "Confidence in orientation (higher is better)."]
18805    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18806    pub orientation_confidence: f32,
18807    #[doc = "orientation before calibration."]
18808    #[cfg_attr(feature = "serde", serde(default))]
18809    pub old_orientation: MavSensorOrientation,
18810    #[doc = "orientation after calibration."]
18811    #[cfg_attr(feature = "serde", serde(default))]
18812    pub new_orientation: MavSensorOrientation,
18813    #[doc = "field radius correction factor"]
18814    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18815    pub scale_factor: f32,
18816}
18817impl MAG_CAL_REPORT_DATA {
18818    pub const ENCODED_LEN: usize = 54usize;
18819    pub const DEFAULT: Self = Self {
18820        fitness: 0.0_f32,
18821        ofs_x: 0.0_f32,
18822        ofs_y: 0.0_f32,
18823        ofs_z: 0.0_f32,
18824        diag_x: 0.0_f32,
18825        diag_y: 0.0_f32,
18826        diag_z: 0.0_f32,
18827        offdiag_x: 0.0_f32,
18828        offdiag_y: 0.0_f32,
18829        offdiag_z: 0.0_f32,
18830        compass_id: 0_u8,
18831        cal_mask: 0_u8,
18832        cal_status: MagCalStatus::DEFAULT,
18833        autosaved: 0_u8,
18834        orientation_confidence: 0.0_f32,
18835        old_orientation: MavSensorOrientation::DEFAULT,
18836        new_orientation: MavSensorOrientation::DEFAULT,
18837        scale_factor: 0.0_f32,
18838    };
18839    #[cfg(feature = "arbitrary")]
18840    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18841        use arbitrary::{Arbitrary, Unstructured};
18842        let mut buf = [0u8; 1024];
18843        rng.fill_bytes(&mut buf);
18844        let mut unstructured = Unstructured::new(&buf);
18845        Self::arbitrary(&mut unstructured).unwrap_or_default()
18846    }
18847}
18848impl Default for MAG_CAL_REPORT_DATA {
18849    fn default() -> Self {
18850        Self::DEFAULT.clone()
18851    }
18852}
18853impl MessageData for MAG_CAL_REPORT_DATA {
18854    type Message = MavMessage;
18855    const ID: u32 = 192u32;
18856    const NAME: &'static str = "MAG_CAL_REPORT";
18857    const EXTRA_CRC: u8 = 36u8;
18858    const ENCODED_LEN: usize = 54usize;
18859    fn deser(
18860        _version: MavlinkVersion,
18861        __input: &[u8],
18862    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18863        let avail_len = __input.len();
18864        let mut payload_buf = [0; Self::ENCODED_LEN];
18865        let mut buf = if avail_len < Self::ENCODED_LEN {
18866            payload_buf[0..avail_len].copy_from_slice(__input);
18867            Bytes::new(&payload_buf)
18868        } else {
18869            Bytes::new(__input)
18870        };
18871        let mut __struct = Self::default();
18872        __struct.fitness = buf.get_f32_le();
18873        __struct.ofs_x = buf.get_f32_le();
18874        __struct.ofs_y = buf.get_f32_le();
18875        __struct.ofs_z = buf.get_f32_le();
18876        __struct.diag_x = buf.get_f32_le();
18877        __struct.diag_y = buf.get_f32_le();
18878        __struct.diag_z = buf.get_f32_le();
18879        __struct.offdiag_x = buf.get_f32_le();
18880        __struct.offdiag_y = buf.get_f32_le();
18881        __struct.offdiag_z = buf.get_f32_le();
18882        __struct.compass_id = buf.get_u8();
18883        __struct.cal_mask = buf.get_u8();
18884        let tmp = buf.get_u8();
18885        __struct.cal_status =
18886            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18887                enum_type: "MagCalStatus",
18888                value: tmp as u32,
18889            })?;
18890        __struct.autosaved = buf.get_u8();
18891        __struct.orientation_confidence = buf.get_f32_le();
18892        let tmp = buf.get_u8();
18893        __struct.old_orientation =
18894            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18895                enum_type: "MavSensorOrientation",
18896                value: tmp as u32,
18897            })?;
18898        let tmp = buf.get_u8();
18899        __struct.new_orientation =
18900            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18901                enum_type: "MavSensorOrientation",
18902                value: tmp as u32,
18903            })?;
18904        __struct.scale_factor = buf.get_f32_le();
18905        Ok(__struct)
18906    }
18907    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18908        let mut __tmp = BytesMut::new(bytes);
18909        #[allow(clippy::absurd_extreme_comparisons)]
18910        #[allow(unused_comparisons)]
18911        if __tmp.remaining() < Self::ENCODED_LEN {
18912            panic!(
18913                "buffer is too small (need {} bytes, but got {})",
18914                Self::ENCODED_LEN,
18915                __tmp.remaining(),
18916            )
18917        }
18918        __tmp.put_f32_le(self.fitness);
18919        __tmp.put_f32_le(self.ofs_x);
18920        __tmp.put_f32_le(self.ofs_y);
18921        __tmp.put_f32_le(self.ofs_z);
18922        __tmp.put_f32_le(self.diag_x);
18923        __tmp.put_f32_le(self.diag_y);
18924        __tmp.put_f32_le(self.diag_z);
18925        __tmp.put_f32_le(self.offdiag_x);
18926        __tmp.put_f32_le(self.offdiag_y);
18927        __tmp.put_f32_le(self.offdiag_z);
18928        __tmp.put_u8(self.compass_id);
18929        __tmp.put_u8(self.cal_mask);
18930        __tmp.put_u8(self.cal_status as u8);
18931        __tmp.put_u8(self.autosaved);
18932        __tmp.put_f32_le(self.orientation_confidence);
18933        __tmp.put_u8(self.old_orientation as u8);
18934        __tmp.put_u8(self.new_orientation as u8);
18935        __tmp.put_f32_le(self.scale_factor);
18936        if matches!(version, MavlinkVersion::V2) {
18937            let len = __tmp.len();
18938            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18939        } else {
18940            __tmp.len()
18941        }
18942    }
18943}
18944#[doc = "id: 69"]
18945#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
18946#[derive(Debug, Clone, PartialEq)]
18947#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18948#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18949pub struct MANUAL_CONTROL_DATA {
18950    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
18951    pub x: i16,
18952    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
18953    pub y: i16,
18954    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
18955    pub z: i16,
18956    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
18957    pub r: i16,
18958    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
18959    pub buttons: u16,
18960    #[doc = "The system to be controlled."]
18961    pub target: u8,
18962    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
18963    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18964    pub buttons2: u16,
18965    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
18966    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18967    pub enabled_extensions: u8,
18968    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
18969    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18970    pub s: i16,
18971    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
18972    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18973    pub t: i16,
18974    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
18975    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18976    pub aux1: i16,
18977    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
18978    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18979    pub aux2: i16,
18980    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
18981    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18982    pub aux3: i16,
18983    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
18984    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18985    pub aux4: i16,
18986    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
18987    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18988    pub aux5: i16,
18989    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
18990    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18991    pub aux6: i16,
18992}
18993impl MANUAL_CONTROL_DATA {
18994    pub const ENCODED_LEN: usize = 30usize;
18995    pub const DEFAULT: Self = Self {
18996        x: 0_i16,
18997        y: 0_i16,
18998        z: 0_i16,
18999        r: 0_i16,
19000        buttons: 0_u16,
19001        target: 0_u8,
19002        buttons2: 0_u16,
19003        enabled_extensions: 0_u8,
19004        s: 0_i16,
19005        t: 0_i16,
19006        aux1: 0_i16,
19007        aux2: 0_i16,
19008        aux3: 0_i16,
19009        aux4: 0_i16,
19010        aux5: 0_i16,
19011        aux6: 0_i16,
19012    };
19013    #[cfg(feature = "arbitrary")]
19014    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19015        use arbitrary::{Arbitrary, Unstructured};
19016        let mut buf = [0u8; 1024];
19017        rng.fill_bytes(&mut buf);
19018        let mut unstructured = Unstructured::new(&buf);
19019        Self::arbitrary(&mut unstructured).unwrap_or_default()
19020    }
19021}
19022impl Default for MANUAL_CONTROL_DATA {
19023    fn default() -> Self {
19024        Self::DEFAULT.clone()
19025    }
19026}
19027impl MessageData for MANUAL_CONTROL_DATA {
19028    type Message = MavMessage;
19029    const ID: u32 = 69u32;
19030    const NAME: &'static str = "MANUAL_CONTROL";
19031    const EXTRA_CRC: u8 = 243u8;
19032    const ENCODED_LEN: usize = 30usize;
19033    fn deser(
19034        _version: MavlinkVersion,
19035        __input: &[u8],
19036    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19037        let avail_len = __input.len();
19038        let mut payload_buf = [0; Self::ENCODED_LEN];
19039        let mut buf = if avail_len < Self::ENCODED_LEN {
19040            payload_buf[0..avail_len].copy_from_slice(__input);
19041            Bytes::new(&payload_buf)
19042        } else {
19043            Bytes::new(__input)
19044        };
19045        let mut __struct = Self::default();
19046        __struct.x = buf.get_i16_le();
19047        __struct.y = buf.get_i16_le();
19048        __struct.z = buf.get_i16_le();
19049        __struct.r = buf.get_i16_le();
19050        __struct.buttons = buf.get_u16_le();
19051        __struct.target = buf.get_u8();
19052        __struct.buttons2 = buf.get_u16_le();
19053        __struct.enabled_extensions = buf.get_u8();
19054        __struct.s = buf.get_i16_le();
19055        __struct.t = buf.get_i16_le();
19056        __struct.aux1 = buf.get_i16_le();
19057        __struct.aux2 = buf.get_i16_le();
19058        __struct.aux3 = buf.get_i16_le();
19059        __struct.aux4 = buf.get_i16_le();
19060        __struct.aux5 = buf.get_i16_le();
19061        __struct.aux6 = buf.get_i16_le();
19062        Ok(__struct)
19063    }
19064    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19065        let mut __tmp = BytesMut::new(bytes);
19066        #[allow(clippy::absurd_extreme_comparisons)]
19067        #[allow(unused_comparisons)]
19068        if __tmp.remaining() < Self::ENCODED_LEN {
19069            panic!(
19070                "buffer is too small (need {} bytes, but got {})",
19071                Self::ENCODED_LEN,
19072                __tmp.remaining(),
19073            )
19074        }
19075        __tmp.put_i16_le(self.x);
19076        __tmp.put_i16_le(self.y);
19077        __tmp.put_i16_le(self.z);
19078        __tmp.put_i16_le(self.r);
19079        __tmp.put_u16_le(self.buttons);
19080        __tmp.put_u8(self.target);
19081        __tmp.put_u16_le(self.buttons2);
19082        __tmp.put_u8(self.enabled_extensions);
19083        __tmp.put_i16_le(self.s);
19084        __tmp.put_i16_le(self.t);
19085        __tmp.put_i16_le(self.aux1);
19086        __tmp.put_i16_le(self.aux2);
19087        __tmp.put_i16_le(self.aux3);
19088        __tmp.put_i16_le(self.aux4);
19089        __tmp.put_i16_le(self.aux5);
19090        __tmp.put_i16_le(self.aux6);
19091        if matches!(version, MavlinkVersion::V2) {
19092            let len = __tmp.len();
19093            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19094        } else {
19095            __tmp.len()
19096        }
19097    }
19098}
19099#[doc = "id: 81"]
19100#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19101#[derive(Debug, Clone, PartialEq)]
19102#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19103#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19104pub struct MANUAL_SETPOINT_DATA {
19105    #[doc = "Timestamp (time since system boot)."]
19106    pub time_boot_ms: u32,
19107    #[doc = "Desired roll rate"]
19108    pub roll: f32,
19109    #[doc = "Desired pitch rate"]
19110    pub pitch: f32,
19111    #[doc = "Desired yaw rate"]
19112    pub yaw: f32,
19113    #[doc = "Collective thrust, normalized to 0 .. 1"]
19114    pub thrust: f32,
19115    #[doc = "Flight mode switch position, 0.. 255"]
19116    pub mode_switch: u8,
19117    #[doc = "Override mode switch position, 0.. 255"]
19118    pub manual_override_switch: u8,
19119}
19120impl MANUAL_SETPOINT_DATA {
19121    pub const ENCODED_LEN: usize = 22usize;
19122    pub const DEFAULT: Self = Self {
19123        time_boot_ms: 0_u32,
19124        roll: 0.0_f32,
19125        pitch: 0.0_f32,
19126        yaw: 0.0_f32,
19127        thrust: 0.0_f32,
19128        mode_switch: 0_u8,
19129        manual_override_switch: 0_u8,
19130    };
19131    #[cfg(feature = "arbitrary")]
19132    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19133        use arbitrary::{Arbitrary, Unstructured};
19134        let mut buf = [0u8; 1024];
19135        rng.fill_bytes(&mut buf);
19136        let mut unstructured = Unstructured::new(&buf);
19137        Self::arbitrary(&mut unstructured).unwrap_or_default()
19138    }
19139}
19140impl Default for MANUAL_SETPOINT_DATA {
19141    fn default() -> Self {
19142        Self::DEFAULT.clone()
19143    }
19144}
19145impl MessageData for MANUAL_SETPOINT_DATA {
19146    type Message = MavMessage;
19147    const ID: u32 = 81u32;
19148    const NAME: &'static str = "MANUAL_SETPOINT";
19149    const EXTRA_CRC: u8 = 106u8;
19150    const ENCODED_LEN: usize = 22usize;
19151    fn deser(
19152        _version: MavlinkVersion,
19153        __input: &[u8],
19154    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19155        let avail_len = __input.len();
19156        let mut payload_buf = [0; Self::ENCODED_LEN];
19157        let mut buf = if avail_len < Self::ENCODED_LEN {
19158            payload_buf[0..avail_len].copy_from_slice(__input);
19159            Bytes::new(&payload_buf)
19160        } else {
19161            Bytes::new(__input)
19162        };
19163        let mut __struct = Self::default();
19164        __struct.time_boot_ms = buf.get_u32_le();
19165        __struct.roll = buf.get_f32_le();
19166        __struct.pitch = buf.get_f32_le();
19167        __struct.yaw = buf.get_f32_le();
19168        __struct.thrust = buf.get_f32_le();
19169        __struct.mode_switch = buf.get_u8();
19170        __struct.manual_override_switch = buf.get_u8();
19171        Ok(__struct)
19172    }
19173    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19174        let mut __tmp = BytesMut::new(bytes);
19175        #[allow(clippy::absurd_extreme_comparisons)]
19176        #[allow(unused_comparisons)]
19177        if __tmp.remaining() < Self::ENCODED_LEN {
19178            panic!(
19179                "buffer is too small (need {} bytes, but got {})",
19180                Self::ENCODED_LEN,
19181                __tmp.remaining(),
19182            )
19183        }
19184        __tmp.put_u32_le(self.time_boot_ms);
19185        __tmp.put_f32_le(self.roll);
19186        __tmp.put_f32_le(self.pitch);
19187        __tmp.put_f32_le(self.yaw);
19188        __tmp.put_f32_le(self.thrust);
19189        __tmp.put_u8(self.mode_switch);
19190        __tmp.put_u8(self.manual_override_switch);
19191        if matches!(version, MavlinkVersion::V2) {
19192            let len = __tmp.len();
19193            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19194        } else {
19195            __tmp.len()
19196        }
19197    }
19198}
19199#[doc = "id: 249"]
19200#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19201#[derive(Debug, Clone, PartialEq)]
19202#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19203#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19204pub struct MEMORY_VECT_DATA {
19205    #[doc = "Starting address of the debug variables"]
19206    pub address: u16,
19207    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19208    pub ver: u8,
19209    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19210    pub mavtype: u8,
19211    #[doc = "Memory contents at specified address"]
19212    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19213    pub value: [i8; 32],
19214}
19215impl MEMORY_VECT_DATA {
19216    pub const ENCODED_LEN: usize = 36usize;
19217    pub const DEFAULT: Self = Self {
19218        address: 0_u16,
19219        ver: 0_u8,
19220        mavtype: 0_u8,
19221        value: [0_i8; 32usize],
19222    };
19223    #[cfg(feature = "arbitrary")]
19224    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19225        use arbitrary::{Arbitrary, Unstructured};
19226        let mut buf = [0u8; 1024];
19227        rng.fill_bytes(&mut buf);
19228        let mut unstructured = Unstructured::new(&buf);
19229        Self::arbitrary(&mut unstructured).unwrap_or_default()
19230    }
19231}
19232impl Default for MEMORY_VECT_DATA {
19233    fn default() -> Self {
19234        Self::DEFAULT.clone()
19235    }
19236}
19237impl MessageData for MEMORY_VECT_DATA {
19238    type Message = MavMessage;
19239    const ID: u32 = 249u32;
19240    const NAME: &'static str = "MEMORY_VECT";
19241    const EXTRA_CRC: u8 = 204u8;
19242    const ENCODED_LEN: usize = 36usize;
19243    fn deser(
19244        _version: MavlinkVersion,
19245        __input: &[u8],
19246    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19247        let avail_len = __input.len();
19248        let mut payload_buf = [0; Self::ENCODED_LEN];
19249        let mut buf = if avail_len < Self::ENCODED_LEN {
19250            payload_buf[0..avail_len].copy_from_slice(__input);
19251            Bytes::new(&payload_buf)
19252        } else {
19253            Bytes::new(__input)
19254        };
19255        let mut __struct = Self::default();
19256        __struct.address = buf.get_u16_le();
19257        __struct.ver = buf.get_u8();
19258        __struct.mavtype = buf.get_u8();
19259        for v in &mut __struct.value {
19260            let val = buf.get_i8();
19261            *v = val;
19262        }
19263        Ok(__struct)
19264    }
19265    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19266        let mut __tmp = BytesMut::new(bytes);
19267        #[allow(clippy::absurd_extreme_comparisons)]
19268        #[allow(unused_comparisons)]
19269        if __tmp.remaining() < Self::ENCODED_LEN {
19270            panic!(
19271                "buffer is too small (need {} bytes, but got {})",
19272                Self::ENCODED_LEN,
19273                __tmp.remaining(),
19274            )
19275        }
19276        __tmp.put_u16_le(self.address);
19277        __tmp.put_u8(self.ver);
19278        __tmp.put_u8(self.mavtype);
19279        for val in &self.value {
19280            __tmp.put_i8(*val);
19281        }
19282        if matches!(version, MavlinkVersion::V2) {
19283            let len = __tmp.len();
19284            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19285        } else {
19286            __tmp.len()
19287        }
19288    }
19289}
19290#[doc = "id: 244"]
19291#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19292#[derive(Debug, Clone, PartialEq)]
19293#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19294#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19295pub struct MESSAGE_INTERVAL_DATA {
19296    #[doc = "0 indicates the interval at which it is sent."]
19297    pub interval_us: i32,
19298    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19299    pub message_id: u16,
19300}
19301impl MESSAGE_INTERVAL_DATA {
19302    pub const ENCODED_LEN: usize = 6usize;
19303    pub const DEFAULT: Self = Self {
19304        interval_us: 0_i32,
19305        message_id: 0_u16,
19306    };
19307    #[cfg(feature = "arbitrary")]
19308    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19309        use arbitrary::{Arbitrary, Unstructured};
19310        let mut buf = [0u8; 1024];
19311        rng.fill_bytes(&mut buf);
19312        let mut unstructured = Unstructured::new(&buf);
19313        Self::arbitrary(&mut unstructured).unwrap_or_default()
19314    }
19315}
19316impl Default for MESSAGE_INTERVAL_DATA {
19317    fn default() -> Self {
19318        Self::DEFAULT.clone()
19319    }
19320}
19321impl MessageData for MESSAGE_INTERVAL_DATA {
19322    type Message = MavMessage;
19323    const ID: u32 = 244u32;
19324    const NAME: &'static str = "MESSAGE_INTERVAL";
19325    const EXTRA_CRC: u8 = 95u8;
19326    const ENCODED_LEN: usize = 6usize;
19327    fn deser(
19328        _version: MavlinkVersion,
19329        __input: &[u8],
19330    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19331        let avail_len = __input.len();
19332        let mut payload_buf = [0; Self::ENCODED_LEN];
19333        let mut buf = if avail_len < Self::ENCODED_LEN {
19334            payload_buf[0..avail_len].copy_from_slice(__input);
19335            Bytes::new(&payload_buf)
19336        } else {
19337            Bytes::new(__input)
19338        };
19339        let mut __struct = Self::default();
19340        __struct.interval_us = buf.get_i32_le();
19341        __struct.message_id = buf.get_u16_le();
19342        Ok(__struct)
19343    }
19344    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19345        let mut __tmp = BytesMut::new(bytes);
19346        #[allow(clippy::absurd_extreme_comparisons)]
19347        #[allow(unused_comparisons)]
19348        if __tmp.remaining() < Self::ENCODED_LEN {
19349            panic!(
19350                "buffer is too small (need {} bytes, but got {})",
19351                Self::ENCODED_LEN,
19352                __tmp.remaining(),
19353            )
19354        }
19355        __tmp.put_i32_le(self.interval_us);
19356        __tmp.put_u16_le(self.message_id);
19357        if matches!(version, MavlinkVersion::V2) {
19358            let len = __tmp.len();
19359            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19360        } else {
19361            __tmp.len()
19362        }
19363    }
19364}
19365#[doc = "id: 47"]
19366#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19367#[derive(Debug, Clone, PartialEq)]
19368#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19369#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19370pub struct MISSION_ACK_DATA {
19371    #[doc = "System ID"]
19372    pub target_system: u8,
19373    #[doc = "Component ID"]
19374    pub target_component: u8,
19375    #[doc = "Mission result."]
19376    pub mavtype: MavMissionResult,
19377    #[doc = "Mission type."]
19378    #[cfg_attr(feature = "serde", serde(default))]
19379    pub mission_type: MavMissionType,
19380    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19381    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19382    pub opaque_id: u32,
19383}
19384impl MISSION_ACK_DATA {
19385    pub const ENCODED_LEN: usize = 8usize;
19386    pub const DEFAULT: Self = Self {
19387        target_system: 0_u8,
19388        target_component: 0_u8,
19389        mavtype: MavMissionResult::DEFAULT,
19390        mission_type: MavMissionType::DEFAULT,
19391        opaque_id: 0_u32,
19392    };
19393    #[cfg(feature = "arbitrary")]
19394    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19395        use arbitrary::{Arbitrary, Unstructured};
19396        let mut buf = [0u8; 1024];
19397        rng.fill_bytes(&mut buf);
19398        let mut unstructured = Unstructured::new(&buf);
19399        Self::arbitrary(&mut unstructured).unwrap_or_default()
19400    }
19401}
19402impl Default for MISSION_ACK_DATA {
19403    fn default() -> Self {
19404        Self::DEFAULT.clone()
19405    }
19406}
19407impl MessageData for MISSION_ACK_DATA {
19408    type Message = MavMessage;
19409    const ID: u32 = 47u32;
19410    const NAME: &'static str = "MISSION_ACK";
19411    const EXTRA_CRC: u8 = 153u8;
19412    const ENCODED_LEN: usize = 8usize;
19413    fn deser(
19414        _version: MavlinkVersion,
19415        __input: &[u8],
19416    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19417        let avail_len = __input.len();
19418        let mut payload_buf = [0; Self::ENCODED_LEN];
19419        let mut buf = if avail_len < Self::ENCODED_LEN {
19420            payload_buf[0..avail_len].copy_from_slice(__input);
19421            Bytes::new(&payload_buf)
19422        } else {
19423            Bytes::new(__input)
19424        };
19425        let mut __struct = Self::default();
19426        __struct.target_system = buf.get_u8();
19427        __struct.target_component = buf.get_u8();
19428        let tmp = buf.get_u8();
19429        __struct.mavtype =
19430            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19431                enum_type: "MavMissionResult",
19432                value: tmp as u32,
19433            })?;
19434        let tmp = buf.get_u8();
19435        __struct.mission_type =
19436            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19437                enum_type: "MavMissionType",
19438                value: tmp as u32,
19439            })?;
19440        __struct.opaque_id = buf.get_u32_le();
19441        Ok(__struct)
19442    }
19443    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19444        let mut __tmp = BytesMut::new(bytes);
19445        #[allow(clippy::absurd_extreme_comparisons)]
19446        #[allow(unused_comparisons)]
19447        if __tmp.remaining() < Self::ENCODED_LEN {
19448            panic!(
19449                "buffer is too small (need {} bytes, but got {})",
19450                Self::ENCODED_LEN,
19451                __tmp.remaining(),
19452            )
19453        }
19454        __tmp.put_u8(self.target_system);
19455        __tmp.put_u8(self.target_component);
19456        __tmp.put_u8(self.mavtype as u8);
19457        __tmp.put_u8(self.mission_type as u8);
19458        __tmp.put_u32_le(self.opaque_id);
19459        if matches!(version, MavlinkVersion::V2) {
19460            let len = __tmp.len();
19461            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19462        } else {
19463            __tmp.len()
19464        }
19465    }
19466}
19467#[doc = "id: 45"]
19468#[doc = "Delete all mission items at once."]
19469#[derive(Debug, Clone, PartialEq)]
19470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19472pub struct MISSION_CLEAR_ALL_DATA {
19473    #[doc = "System ID"]
19474    pub target_system: u8,
19475    #[doc = "Component ID"]
19476    pub target_component: u8,
19477    #[doc = "Mission type."]
19478    #[cfg_attr(feature = "serde", serde(default))]
19479    pub mission_type: MavMissionType,
19480}
19481impl MISSION_CLEAR_ALL_DATA {
19482    pub const ENCODED_LEN: usize = 3usize;
19483    pub const DEFAULT: Self = Self {
19484        target_system: 0_u8,
19485        target_component: 0_u8,
19486        mission_type: MavMissionType::DEFAULT,
19487    };
19488    #[cfg(feature = "arbitrary")]
19489    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19490        use arbitrary::{Arbitrary, Unstructured};
19491        let mut buf = [0u8; 1024];
19492        rng.fill_bytes(&mut buf);
19493        let mut unstructured = Unstructured::new(&buf);
19494        Self::arbitrary(&mut unstructured).unwrap_or_default()
19495    }
19496}
19497impl Default for MISSION_CLEAR_ALL_DATA {
19498    fn default() -> Self {
19499        Self::DEFAULT.clone()
19500    }
19501}
19502impl MessageData for MISSION_CLEAR_ALL_DATA {
19503    type Message = MavMessage;
19504    const ID: u32 = 45u32;
19505    const NAME: &'static str = "MISSION_CLEAR_ALL";
19506    const EXTRA_CRC: u8 = 232u8;
19507    const ENCODED_LEN: usize = 3usize;
19508    fn deser(
19509        _version: MavlinkVersion,
19510        __input: &[u8],
19511    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19512        let avail_len = __input.len();
19513        let mut payload_buf = [0; Self::ENCODED_LEN];
19514        let mut buf = if avail_len < Self::ENCODED_LEN {
19515            payload_buf[0..avail_len].copy_from_slice(__input);
19516            Bytes::new(&payload_buf)
19517        } else {
19518            Bytes::new(__input)
19519        };
19520        let mut __struct = Self::default();
19521        __struct.target_system = buf.get_u8();
19522        __struct.target_component = buf.get_u8();
19523        let tmp = buf.get_u8();
19524        __struct.mission_type =
19525            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19526                enum_type: "MavMissionType",
19527                value: tmp as u32,
19528            })?;
19529        Ok(__struct)
19530    }
19531    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19532        let mut __tmp = BytesMut::new(bytes);
19533        #[allow(clippy::absurd_extreme_comparisons)]
19534        #[allow(unused_comparisons)]
19535        if __tmp.remaining() < Self::ENCODED_LEN {
19536            panic!(
19537                "buffer is too small (need {} bytes, but got {})",
19538                Self::ENCODED_LEN,
19539                __tmp.remaining(),
19540            )
19541        }
19542        __tmp.put_u8(self.target_system);
19543        __tmp.put_u8(self.target_component);
19544        __tmp.put_u8(self.mission_type as u8);
19545        if matches!(version, MavlinkVersion::V2) {
19546            let len = __tmp.len();
19547            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19548        } else {
19549            __tmp.len()
19550        }
19551    }
19552}
19553#[doc = "id: 44"]
19554#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19555#[derive(Debug, Clone, PartialEq)]
19556#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19557#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19558pub struct MISSION_COUNT_DATA {
19559    #[doc = "Number of mission items in the sequence"]
19560    pub count: u16,
19561    #[doc = "System ID"]
19562    pub target_system: u8,
19563    #[doc = "Component ID"]
19564    pub target_component: u8,
19565    #[doc = "Mission type."]
19566    #[cfg_attr(feature = "serde", serde(default))]
19567    pub mission_type: MavMissionType,
19568    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19569    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19570    pub opaque_id: u32,
19571}
19572impl MISSION_COUNT_DATA {
19573    pub const ENCODED_LEN: usize = 9usize;
19574    pub const DEFAULT: Self = Self {
19575        count: 0_u16,
19576        target_system: 0_u8,
19577        target_component: 0_u8,
19578        mission_type: MavMissionType::DEFAULT,
19579        opaque_id: 0_u32,
19580    };
19581    #[cfg(feature = "arbitrary")]
19582    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19583        use arbitrary::{Arbitrary, Unstructured};
19584        let mut buf = [0u8; 1024];
19585        rng.fill_bytes(&mut buf);
19586        let mut unstructured = Unstructured::new(&buf);
19587        Self::arbitrary(&mut unstructured).unwrap_or_default()
19588    }
19589}
19590impl Default for MISSION_COUNT_DATA {
19591    fn default() -> Self {
19592        Self::DEFAULT.clone()
19593    }
19594}
19595impl MessageData for MISSION_COUNT_DATA {
19596    type Message = MavMessage;
19597    const ID: u32 = 44u32;
19598    const NAME: &'static str = "MISSION_COUNT";
19599    const EXTRA_CRC: u8 = 221u8;
19600    const ENCODED_LEN: usize = 9usize;
19601    fn deser(
19602        _version: MavlinkVersion,
19603        __input: &[u8],
19604    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19605        let avail_len = __input.len();
19606        let mut payload_buf = [0; Self::ENCODED_LEN];
19607        let mut buf = if avail_len < Self::ENCODED_LEN {
19608            payload_buf[0..avail_len].copy_from_slice(__input);
19609            Bytes::new(&payload_buf)
19610        } else {
19611            Bytes::new(__input)
19612        };
19613        let mut __struct = Self::default();
19614        __struct.count = buf.get_u16_le();
19615        __struct.target_system = buf.get_u8();
19616        __struct.target_component = buf.get_u8();
19617        let tmp = buf.get_u8();
19618        __struct.mission_type =
19619            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19620                enum_type: "MavMissionType",
19621                value: tmp as u32,
19622            })?;
19623        __struct.opaque_id = buf.get_u32_le();
19624        Ok(__struct)
19625    }
19626    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19627        let mut __tmp = BytesMut::new(bytes);
19628        #[allow(clippy::absurd_extreme_comparisons)]
19629        #[allow(unused_comparisons)]
19630        if __tmp.remaining() < Self::ENCODED_LEN {
19631            panic!(
19632                "buffer is too small (need {} bytes, but got {})",
19633                Self::ENCODED_LEN,
19634                __tmp.remaining(),
19635            )
19636        }
19637        __tmp.put_u16_le(self.count);
19638        __tmp.put_u8(self.target_system);
19639        __tmp.put_u8(self.target_component);
19640        __tmp.put_u8(self.mission_type as u8);
19641        __tmp.put_u32_le(self.opaque_id);
19642        if matches!(version, MavlinkVersion::V2) {
19643            let len = __tmp.len();
19644            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19645        } else {
19646            __tmp.len()
19647        }
19648    }
19649}
19650#[doc = "id: 42"]
19651#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19652#[derive(Debug, Clone, PartialEq)]
19653#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19654#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19655pub struct MISSION_CURRENT_DATA {
19656    #[doc = "Sequence"]
19657    pub seq: u16,
19658    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19659    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19660    pub total: u16,
19661    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19662    #[cfg_attr(feature = "serde", serde(default))]
19663    pub mission_state: MissionState,
19664    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19665    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19666    pub mission_mode: u8,
19667    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19668    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19669    pub mission_id: u32,
19670    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19671    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19672    pub fence_id: u32,
19673    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19674    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19675    pub rally_points_id: u32,
19676}
19677impl MISSION_CURRENT_DATA {
19678    pub const ENCODED_LEN: usize = 18usize;
19679    pub const DEFAULT: Self = Self {
19680        seq: 0_u16,
19681        total: 0_u16,
19682        mission_state: MissionState::DEFAULT,
19683        mission_mode: 0_u8,
19684        mission_id: 0_u32,
19685        fence_id: 0_u32,
19686        rally_points_id: 0_u32,
19687    };
19688    #[cfg(feature = "arbitrary")]
19689    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19690        use arbitrary::{Arbitrary, Unstructured};
19691        let mut buf = [0u8; 1024];
19692        rng.fill_bytes(&mut buf);
19693        let mut unstructured = Unstructured::new(&buf);
19694        Self::arbitrary(&mut unstructured).unwrap_or_default()
19695    }
19696}
19697impl Default for MISSION_CURRENT_DATA {
19698    fn default() -> Self {
19699        Self::DEFAULT.clone()
19700    }
19701}
19702impl MessageData for MISSION_CURRENT_DATA {
19703    type Message = MavMessage;
19704    const ID: u32 = 42u32;
19705    const NAME: &'static str = "MISSION_CURRENT";
19706    const EXTRA_CRC: u8 = 28u8;
19707    const ENCODED_LEN: usize = 18usize;
19708    fn deser(
19709        _version: MavlinkVersion,
19710        __input: &[u8],
19711    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19712        let avail_len = __input.len();
19713        let mut payload_buf = [0; Self::ENCODED_LEN];
19714        let mut buf = if avail_len < Self::ENCODED_LEN {
19715            payload_buf[0..avail_len].copy_from_slice(__input);
19716            Bytes::new(&payload_buf)
19717        } else {
19718            Bytes::new(__input)
19719        };
19720        let mut __struct = Self::default();
19721        __struct.seq = buf.get_u16_le();
19722        __struct.total = buf.get_u16_le();
19723        let tmp = buf.get_u8();
19724        __struct.mission_state =
19725            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19726                enum_type: "MissionState",
19727                value: tmp as u32,
19728            })?;
19729        __struct.mission_mode = buf.get_u8();
19730        __struct.mission_id = buf.get_u32_le();
19731        __struct.fence_id = buf.get_u32_le();
19732        __struct.rally_points_id = buf.get_u32_le();
19733        Ok(__struct)
19734    }
19735    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19736        let mut __tmp = BytesMut::new(bytes);
19737        #[allow(clippy::absurd_extreme_comparisons)]
19738        #[allow(unused_comparisons)]
19739        if __tmp.remaining() < Self::ENCODED_LEN {
19740            panic!(
19741                "buffer is too small (need {} bytes, but got {})",
19742                Self::ENCODED_LEN,
19743                __tmp.remaining(),
19744            )
19745        }
19746        __tmp.put_u16_le(self.seq);
19747        __tmp.put_u16_le(self.total);
19748        __tmp.put_u8(self.mission_state as u8);
19749        __tmp.put_u8(self.mission_mode);
19750        __tmp.put_u32_le(self.mission_id);
19751        __tmp.put_u32_le(self.fence_id);
19752        __tmp.put_u32_le(self.rally_points_id);
19753        if matches!(version, MavlinkVersion::V2) {
19754            let len = __tmp.len();
19755            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19756        } else {
19757            __tmp.len()
19758        }
19759    }
19760}
19761#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
19762#[doc = "id: 39"]
19763#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19764#[derive(Debug, Clone, PartialEq)]
19765#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19766#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19767pub struct MISSION_ITEM_DATA {
19768    #[doc = "PARAM1, see MAV_CMD enum"]
19769    pub param1: f32,
19770    #[doc = "PARAM2, see MAV_CMD enum"]
19771    pub param2: f32,
19772    #[doc = "PARAM3, see MAV_CMD enum"]
19773    pub param3: f32,
19774    #[doc = "PARAM4, see MAV_CMD enum"]
19775    pub param4: f32,
19776    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
19777    pub x: f32,
19778    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
19779    pub y: f32,
19780    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
19781    pub z: f32,
19782    #[doc = "Sequence"]
19783    pub seq: u16,
19784    #[doc = "The scheduled action for the waypoint."]
19785    pub command: MavCmd,
19786    #[doc = "System ID"]
19787    pub target_system: u8,
19788    #[doc = "Component ID"]
19789    pub target_component: u8,
19790    #[doc = "The coordinate system of the waypoint."]
19791    pub frame: MavFrame,
19792    #[doc = "false:0, true:1"]
19793    pub current: u8,
19794    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19795    pub autocontinue: u8,
19796    #[doc = "Mission type."]
19797    #[cfg_attr(feature = "serde", serde(default))]
19798    pub mission_type: MavMissionType,
19799}
19800impl MISSION_ITEM_DATA {
19801    pub const ENCODED_LEN: usize = 38usize;
19802    pub const DEFAULT: Self = Self {
19803        param1: 0.0_f32,
19804        param2: 0.0_f32,
19805        param3: 0.0_f32,
19806        param4: 0.0_f32,
19807        x: 0.0_f32,
19808        y: 0.0_f32,
19809        z: 0.0_f32,
19810        seq: 0_u16,
19811        command: MavCmd::DEFAULT,
19812        target_system: 0_u8,
19813        target_component: 0_u8,
19814        frame: MavFrame::DEFAULT,
19815        current: 0_u8,
19816        autocontinue: 0_u8,
19817        mission_type: MavMissionType::DEFAULT,
19818    };
19819    #[cfg(feature = "arbitrary")]
19820    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19821        use arbitrary::{Arbitrary, Unstructured};
19822        let mut buf = [0u8; 1024];
19823        rng.fill_bytes(&mut buf);
19824        let mut unstructured = Unstructured::new(&buf);
19825        Self::arbitrary(&mut unstructured).unwrap_or_default()
19826    }
19827}
19828impl Default for MISSION_ITEM_DATA {
19829    fn default() -> Self {
19830        Self::DEFAULT.clone()
19831    }
19832}
19833impl MessageData for MISSION_ITEM_DATA {
19834    type Message = MavMessage;
19835    const ID: u32 = 39u32;
19836    const NAME: &'static str = "MISSION_ITEM";
19837    const EXTRA_CRC: u8 = 254u8;
19838    const ENCODED_LEN: usize = 38usize;
19839    fn deser(
19840        _version: MavlinkVersion,
19841        __input: &[u8],
19842    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19843        let avail_len = __input.len();
19844        let mut payload_buf = [0; Self::ENCODED_LEN];
19845        let mut buf = if avail_len < Self::ENCODED_LEN {
19846            payload_buf[0..avail_len].copy_from_slice(__input);
19847            Bytes::new(&payload_buf)
19848        } else {
19849            Bytes::new(__input)
19850        };
19851        let mut __struct = Self::default();
19852        __struct.param1 = buf.get_f32_le();
19853        __struct.param2 = buf.get_f32_le();
19854        __struct.param3 = buf.get_f32_le();
19855        __struct.param4 = buf.get_f32_le();
19856        __struct.x = buf.get_f32_le();
19857        __struct.y = buf.get_f32_le();
19858        __struct.z = buf.get_f32_le();
19859        __struct.seq = buf.get_u16_le();
19860        let tmp = buf.get_u16_le();
19861        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19862            ::mavlink_core::error::ParserError::InvalidEnum {
19863                enum_type: "MavCmd",
19864                value: tmp as u32,
19865            },
19866        )?;
19867        __struct.target_system = buf.get_u8();
19868        __struct.target_component = buf.get_u8();
19869        let tmp = buf.get_u8();
19870        __struct.frame =
19871            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19872                enum_type: "MavFrame",
19873                value: tmp as u32,
19874            })?;
19875        __struct.current = buf.get_u8();
19876        __struct.autocontinue = buf.get_u8();
19877        let tmp = buf.get_u8();
19878        __struct.mission_type =
19879            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19880                enum_type: "MavMissionType",
19881                value: tmp as u32,
19882            })?;
19883        Ok(__struct)
19884    }
19885    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19886        let mut __tmp = BytesMut::new(bytes);
19887        #[allow(clippy::absurd_extreme_comparisons)]
19888        #[allow(unused_comparisons)]
19889        if __tmp.remaining() < Self::ENCODED_LEN {
19890            panic!(
19891                "buffer is too small (need {} bytes, but got {})",
19892                Self::ENCODED_LEN,
19893                __tmp.remaining(),
19894            )
19895        }
19896        __tmp.put_f32_le(self.param1);
19897        __tmp.put_f32_le(self.param2);
19898        __tmp.put_f32_le(self.param3);
19899        __tmp.put_f32_le(self.param4);
19900        __tmp.put_f32_le(self.x);
19901        __tmp.put_f32_le(self.y);
19902        __tmp.put_f32_le(self.z);
19903        __tmp.put_u16_le(self.seq);
19904        __tmp.put_u16_le(self.command as u16);
19905        __tmp.put_u8(self.target_system);
19906        __tmp.put_u8(self.target_component);
19907        __tmp.put_u8(self.frame as u8);
19908        __tmp.put_u8(self.current);
19909        __tmp.put_u8(self.autocontinue);
19910        __tmp.put_u8(self.mission_type as u8);
19911        if matches!(version, MavlinkVersion::V2) {
19912            let len = __tmp.len();
19913            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19914        } else {
19915            __tmp.len()
19916        }
19917    }
19918}
19919#[doc = "id: 73"]
19920#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19921#[derive(Debug, Clone, PartialEq)]
19922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19924pub struct MISSION_ITEM_INT_DATA {
19925    #[doc = "PARAM1, see MAV_CMD enum"]
19926    pub param1: f32,
19927    #[doc = "PARAM2, see MAV_CMD enum"]
19928    pub param2: f32,
19929    #[doc = "PARAM3, see MAV_CMD enum"]
19930    pub param3: f32,
19931    #[doc = "PARAM4, see MAV_CMD enum"]
19932    pub param4: f32,
19933    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
19934    pub x: i32,
19935    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
19936    pub y: i32,
19937    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
19938    pub z: f32,
19939    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
19940    pub seq: u16,
19941    #[doc = "The scheduled action for the waypoint."]
19942    pub command: MavCmd,
19943    #[doc = "System ID"]
19944    pub target_system: u8,
19945    #[doc = "Component ID"]
19946    pub target_component: u8,
19947    #[doc = "The coordinate system of the waypoint."]
19948    pub frame: MavFrame,
19949    #[doc = "false:0, true:1"]
19950    pub current: u8,
19951    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19952    pub autocontinue: u8,
19953    #[doc = "Mission type."]
19954    #[cfg_attr(feature = "serde", serde(default))]
19955    pub mission_type: MavMissionType,
19956}
19957impl MISSION_ITEM_INT_DATA {
19958    pub const ENCODED_LEN: usize = 38usize;
19959    pub const DEFAULT: Self = Self {
19960        param1: 0.0_f32,
19961        param2: 0.0_f32,
19962        param3: 0.0_f32,
19963        param4: 0.0_f32,
19964        x: 0_i32,
19965        y: 0_i32,
19966        z: 0.0_f32,
19967        seq: 0_u16,
19968        command: MavCmd::DEFAULT,
19969        target_system: 0_u8,
19970        target_component: 0_u8,
19971        frame: MavFrame::DEFAULT,
19972        current: 0_u8,
19973        autocontinue: 0_u8,
19974        mission_type: MavMissionType::DEFAULT,
19975    };
19976    #[cfg(feature = "arbitrary")]
19977    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19978        use arbitrary::{Arbitrary, Unstructured};
19979        let mut buf = [0u8; 1024];
19980        rng.fill_bytes(&mut buf);
19981        let mut unstructured = Unstructured::new(&buf);
19982        Self::arbitrary(&mut unstructured).unwrap_or_default()
19983    }
19984}
19985impl Default for MISSION_ITEM_INT_DATA {
19986    fn default() -> Self {
19987        Self::DEFAULT.clone()
19988    }
19989}
19990impl MessageData for MISSION_ITEM_INT_DATA {
19991    type Message = MavMessage;
19992    const ID: u32 = 73u32;
19993    const NAME: &'static str = "MISSION_ITEM_INT";
19994    const EXTRA_CRC: u8 = 38u8;
19995    const ENCODED_LEN: usize = 38usize;
19996    fn deser(
19997        _version: MavlinkVersion,
19998        __input: &[u8],
19999    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20000        let avail_len = __input.len();
20001        let mut payload_buf = [0; Self::ENCODED_LEN];
20002        let mut buf = if avail_len < Self::ENCODED_LEN {
20003            payload_buf[0..avail_len].copy_from_slice(__input);
20004            Bytes::new(&payload_buf)
20005        } else {
20006            Bytes::new(__input)
20007        };
20008        let mut __struct = Self::default();
20009        __struct.param1 = buf.get_f32_le();
20010        __struct.param2 = buf.get_f32_le();
20011        __struct.param3 = buf.get_f32_le();
20012        __struct.param4 = buf.get_f32_le();
20013        __struct.x = buf.get_i32_le();
20014        __struct.y = buf.get_i32_le();
20015        __struct.z = buf.get_f32_le();
20016        __struct.seq = buf.get_u16_le();
20017        let tmp = buf.get_u16_le();
20018        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20019            ::mavlink_core::error::ParserError::InvalidEnum {
20020                enum_type: "MavCmd",
20021                value: tmp as u32,
20022            },
20023        )?;
20024        __struct.target_system = buf.get_u8();
20025        __struct.target_component = buf.get_u8();
20026        let tmp = buf.get_u8();
20027        __struct.frame =
20028            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20029                enum_type: "MavFrame",
20030                value: tmp as u32,
20031            })?;
20032        __struct.current = buf.get_u8();
20033        __struct.autocontinue = buf.get_u8();
20034        let tmp = buf.get_u8();
20035        __struct.mission_type =
20036            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20037                enum_type: "MavMissionType",
20038                value: tmp as u32,
20039            })?;
20040        Ok(__struct)
20041    }
20042    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20043        let mut __tmp = BytesMut::new(bytes);
20044        #[allow(clippy::absurd_extreme_comparisons)]
20045        #[allow(unused_comparisons)]
20046        if __tmp.remaining() < Self::ENCODED_LEN {
20047            panic!(
20048                "buffer is too small (need {} bytes, but got {})",
20049                Self::ENCODED_LEN,
20050                __tmp.remaining(),
20051            )
20052        }
20053        __tmp.put_f32_le(self.param1);
20054        __tmp.put_f32_le(self.param2);
20055        __tmp.put_f32_le(self.param3);
20056        __tmp.put_f32_le(self.param4);
20057        __tmp.put_i32_le(self.x);
20058        __tmp.put_i32_le(self.y);
20059        __tmp.put_f32_le(self.z);
20060        __tmp.put_u16_le(self.seq);
20061        __tmp.put_u16_le(self.command as u16);
20062        __tmp.put_u8(self.target_system);
20063        __tmp.put_u8(self.target_component);
20064        __tmp.put_u8(self.frame as u8);
20065        __tmp.put_u8(self.current);
20066        __tmp.put_u8(self.autocontinue);
20067        __tmp.put_u8(self.mission_type as u8);
20068        if matches!(version, MavlinkVersion::V2) {
20069            let len = __tmp.len();
20070            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20071        } else {
20072            __tmp.len()
20073        }
20074    }
20075}
20076#[doc = "id: 46"]
20077#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20078#[derive(Debug, Clone, PartialEq)]
20079#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20080#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20081pub struct MISSION_ITEM_REACHED_DATA {
20082    #[doc = "Sequence"]
20083    pub seq: u16,
20084}
20085impl MISSION_ITEM_REACHED_DATA {
20086    pub const ENCODED_LEN: usize = 2usize;
20087    pub const DEFAULT: Self = Self { seq: 0_u16 };
20088    #[cfg(feature = "arbitrary")]
20089    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20090        use arbitrary::{Arbitrary, Unstructured};
20091        let mut buf = [0u8; 1024];
20092        rng.fill_bytes(&mut buf);
20093        let mut unstructured = Unstructured::new(&buf);
20094        Self::arbitrary(&mut unstructured).unwrap_or_default()
20095    }
20096}
20097impl Default for MISSION_ITEM_REACHED_DATA {
20098    fn default() -> Self {
20099        Self::DEFAULT.clone()
20100    }
20101}
20102impl MessageData for MISSION_ITEM_REACHED_DATA {
20103    type Message = MavMessage;
20104    const ID: u32 = 46u32;
20105    const NAME: &'static str = "MISSION_ITEM_REACHED";
20106    const EXTRA_CRC: u8 = 11u8;
20107    const ENCODED_LEN: usize = 2usize;
20108    fn deser(
20109        _version: MavlinkVersion,
20110        __input: &[u8],
20111    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20112        let avail_len = __input.len();
20113        let mut payload_buf = [0; Self::ENCODED_LEN];
20114        let mut buf = if avail_len < Self::ENCODED_LEN {
20115            payload_buf[0..avail_len].copy_from_slice(__input);
20116            Bytes::new(&payload_buf)
20117        } else {
20118            Bytes::new(__input)
20119        };
20120        let mut __struct = Self::default();
20121        __struct.seq = buf.get_u16_le();
20122        Ok(__struct)
20123    }
20124    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20125        let mut __tmp = BytesMut::new(bytes);
20126        #[allow(clippy::absurd_extreme_comparisons)]
20127        #[allow(unused_comparisons)]
20128        if __tmp.remaining() < Self::ENCODED_LEN {
20129            panic!(
20130                "buffer is too small (need {} bytes, but got {})",
20131                Self::ENCODED_LEN,
20132                __tmp.remaining(),
20133            )
20134        }
20135        __tmp.put_u16_le(self.seq);
20136        if matches!(version, MavlinkVersion::V2) {
20137            let len = __tmp.len();
20138            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20139        } else {
20140            __tmp.len()
20141        }
20142    }
20143}
20144#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
20145#[doc = "id: 40"]
20146#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
20147#[derive(Debug, Clone, PartialEq)]
20148#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20149#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20150pub struct MISSION_REQUEST_DATA {
20151    #[doc = "Sequence"]
20152    pub seq: u16,
20153    #[doc = "System ID"]
20154    pub target_system: u8,
20155    #[doc = "Component ID"]
20156    pub target_component: u8,
20157    #[doc = "Mission type."]
20158    #[cfg_attr(feature = "serde", serde(default))]
20159    pub mission_type: MavMissionType,
20160}
20161impl MISSION_REQUEST_DATA {
20162    pub const ENCODED_LEN: usize = 5usize;
20163    pub const DEFAULT: Self = Self {
20164        seq: 0_u16,
20165        target_system: 0_u8,
20166        target_component: 0_u8,
20167        mission_type: MavMissionType::DEFAULT,
20168    };
20169    #[cfg(feature = "arbitrary")]
20170    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20171        use arbitrary::{Arbitrary, Unstructured};
20172        let mut buf = [0u8; 1024];
20173        rng.fill_bytes(&mut buf);
20174        let mut unstructured = Unstructured::new(&buf);
20175        Self::arbitrary(&mut unstructured).unwrap_or_default()
20176    }
20177}
20178impl Default for MISSION_REQUEST_DATA {
20179    fn default() -> Self {
20180        Self::DEFAULT.clone()
20181    }
20182}
20183impl MessageData for MISSION_REQUEST_DATA {
20184    type Message = MavMessage;
20185    const ID: u32 = 40u32;
20186    const NAME: &'static str = "MISSION_REQUEST";
20187    const EXTRA_CRC: u8 = 230u8;
20188    const ENCODED_LEN: usize = 5usize;
20189    fn deser(
20190        _version: MavlinkVersion,
20191        __input: &[u8],
20192    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20193        let avail_len = __input.len();
20194        let mut payload_buf = [0; Self::ENCODED_LEN];
20195        let mut buf = if avail_len < Self::ENCODED_LEN {
20196            payload_buf[0..avail_len].copy_from_slice(__input);
20197            Bytes::new(&payload_buf)
20198        } else {
20199            Bytes::new(__input)
20200        };
20201        let mut __struct = Self::default();
20202        __struct.seq = buf.get_u16_le();
20203        __struct.target_system = buf.get_u8();
20204        __struct.target_component = buf.get_u8();
20205        let tmp = buf.get_u8();
20206        __struct.mission_type =
20207            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20208                enum_type: "MavMissionType",
20209                value: tmp as u32,
20210            })?;
20211        Ok(__struct)
20212    }
20213    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20214        let mut __tmp = BytesMut::new(bytes);
20215        #[allow(clippy::absurd_extreme_comparisons)]
20216        #[allow(unused_comparisons)]
20217        if __tmp.remaining() < Self::ENCODED_LEN {
20218            panic!(
20219                "buffer is too small (need {} bytes, but got {})",
20220                Self::ENCODED_LEN,
20221                __tmp.remaining(),
20222            )
20223        }
20224        __tmp.put_u16_le(self.seq);
20225        __tmp.put_u8(self.target_system);
20226        __tmp.put_u8(self.target_component);
20227        __tmp.put_u8(self.mission_type as u8);
20228        if matches!(version, MavlinkVersion::V2) {
20229            let len = __tmp.len();
20230            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20231        } else {
20232            __tmp.len()
20233        }
20234    }
20235}
20236#[doc = "id: 51"]
20237#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20238#[derive(Debug, Clone, PartialEq)]
20239#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20240#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20241pub struct MISSION_REQUEST_INT_DATA {
20242    #[doc = "Sequence"]
20243    pub seq: u16,
20244    #[doc = "System ID"]
20245    pub target_system: u8,
20246    #[doc = "Component ID"]
20247    pub target_component: u8,
20248    #[doc = "Mission type."]
20249    #[cfg_attr(feature = "serde", serde(default))]
20250    pub mission_type: MavMissionType,
20251}
20252impl MISSION_REQUEST_INT_DATA {
20253    pub const ENCODED_LEN: usize = 5usize;
20254    pub const DEFAULT: Self = Self {
20255        seq: 0_u16,
20256        target_system: 0_u8,
20257        target_component: 0_u8,
20258        mission_type: MavMissionType::DEFAULT,
20259    };
20260    #[cfg(feature = "arbitrary")]
20261    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20262        use arbitrary::{Arbitrary, Unstructured};
20263        let mut buf = [0u8; 1024];
20264        rng.fill_bytes(&mut buf);
20265        let mut unstructured = Unstructured::new(&buf);
20266        Self::arbitrary(&mut unstructured).unwrap_or_default()
20267    }
20268}
20269impl Default for MISSION_REQUEST_INT_DATA {
20270    fn default() -> Self {
20271        Self::DEFAULT.clone()
20272    }
20273}
20274impl MessageData for MISSION_REQUEST_INT_DATA {
20275    type Message = MavMessage;
20276    const ID: u32 = 51u32;
20277    const NAME: &'static str = "MISSION_REQUEST_INT";
20278    const EXTRA_CRC: u8 = 196u8;
20279    const ENCODED_LEN: usize = 5usize;
20280    fn deser(
20281        _version: MavlinkVersion,
20282        __input: &[u8],
20283    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20284        let avail_len = __input.len();
20285        let mut payload_buf = [0; Self::ENCODED_LEN];
20286        let mut buf = if avail_len < Self::ENCODED_LEN {
20287            payload_buf[0..avail_len].copy_from_slice(__input);
20288            Bytes::new(&payload_buf)
20289        } else {
20290            Bytes::new(__input)
20291        };
20292        let mut __struct = Self::default();
20293        __struct.seq = buf.get_u16_le();
20294        __struct.target_system = buf.get_u8();
20295        __struct.target_component = buf.get_u8();
20296        let tmp = buf.get_u8();
20297        __struct.mission_type =
20298            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20299                enum_type: "MavMissionType",
20300                value: tmp as u32,
20301            })?;
20302        Ok(__struct)
20303    }
20304    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20305        let mut __tmp = BytesMut::new(bytes);
20306        #[allow(clippy::absurd_extreme_comparisons)]
20307        #[allow(unused_comparisons)]
20308        if __tmp.remaining() < Self::ENCODED_LEN {
20309            panic!(
20310                "buffer is too small (need {} bytes, but got {})",
20311                Self::ENCODED_LEN,
20312                __tmp.remaining(),
20313            )
20314        }
20315        __tmp.put_u16_le(self.seq);
20316        __tmp.put_u8(self.target_system);
20317        __tmp.put_u8(self.target_component);
20318        __tmp.put_u8(self.mission_type as u8);
20319        if matches!(version, MavlinkVersion::V2) {
20320            let len = __tmp.len();
20321            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20322        } else {
20323            __tmp.len()
20324        }
20325    }
20326}
20327#[doc = "id: 43"]
20328#[doc = "Request the overall list of mission items from the system/component."]
20329#[derive(Debug, Clone, PartialEq)]
20330#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20331#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20332pub struct MISSION_REQUEST_LIST_DATA {
20333    #[doc = "System ID"]
20334    pub target_system: u8,
20335    #[doc = "Component ID"]
20336    pub target_component: u8,
20337    #[doc = "Mission type."]
20338    #[cfg_attr(feature = "serde", serde(default))]
20339    pub mission_type: MavMissionType,
20340}
20341impl MISSION_REQUEST_LIST_DATA {
20342    pub const ENCODED_LEN: usize = 3usize;
20343    pub const DEFAULT: Self = Self {
20344        target_system: 0_u8,
20345        target_component: 0_u8,
20346        mission_type: MavMissionType::DEFAULT,
20347    };
20348    #[cfg(feature = "arbitrary")]
20349    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20350        use arbitrary::{Arbitrary, Unstructured};
20351        let mut buf = [0u8; 1024];
20352        rng.fill_bytes(&mut buf);
20353        let mut unstructured = Unstructured::new(&buf);
20354        Self::arbitrary(&mut unstructured).unwrap_or_default()
20355    }
20356}
20357impl Default for MISSION_REQUEST_LIST_DATA {
20358    fn default() -> Self {
20359        Self::DEFAULT.clone()
20360    }
20361}
20362impl MessageData for MISSION_REQUEST_LIST_DATA {
20363    type Message = MavMessage;
20364    const ID: u32 = 43u32;
20365    const NAME: &'static str = "MISSION_REQUEST_LIST";
20366    const EXTRA_CRC: u8 = 132u8;
20367    const ENCODED_LEN: usize = 3usize;
20368    fn deser(
20369        _version: MavlinkVersion,
20370        __input: &[u8],
20371    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20372        let avail_len = __input.len();
20373        let mut payload_buf = [0; Self::ENCODED_LEN];
20374        let mut buf = if avail_len < Self::ENCODED_LEN {
20375            payload_buf[0..avail_len].copy_from_slice(__input);
20376            Bytes::new(&payload_buf)
20377        } else {
20378            Bytes::new(__input)
20379        };
20380        let mut __struct = Self::default();
20381        __struct.target_system = buf.get_u8();
20382        __struct.target_component = buf.get_u8();
20383        let tmp = buf.get_u8();
20384        __struct.mission_type =
20385            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20386                enum_type: "MavMissionType",
20387                value: tmp as u32,
20388            })?;
20389        Ok(__struct)
20390    }
20391    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20392        let mut __tmp = BytesMut::new(bytes);
20393        #[allow(clippy::absurd_extreme_comparisons)]
20394        #[allow(unused_comparisons)]
20395        if __tmp.remaining() < Self::ENCODED_LEN {
20396            panic!(
20397                "buffer is too small (need {} bytes, but got {})",
20398                Self::ENCODED_LEN,
20399                __tmp.remaining(),
20400            )
20401        }
20402        __tmp.put_u8(self.target_system);
20403        __tmp.put_u8(self.target_component);
20404        __tmp.put_u8(self.mission_type as u8);
20405        if matches!(version, MavlinkVersion::V2) {
20406            let len = __tmp.len();
20407            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20408        } else {
20409            __tmp.len()
20410        }
20411    }
20412}
20413#[doc = "id: 37"]
20414#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20415#[derive(Debug, Clone, PartialEq)]
20416#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20418pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20419    #[doc = "Start index"]
20420    pub start_index: i16,
20421    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20422    pub end_index: i16,
20423    #[doc = "System ID"]
20424    pub target_system: u8,
20425    #[doc = "Component ID"]
20426    pub target_component: u8,
20427    #[doc = "Mission type."]
20428    #[cfg_attr(feature = "serde", serde(default))]
20429    pub mission_type: MavMissionType,
20430}
20431impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20432    pub const ENCODED_LEN: usize = 7usize;
20433    pub const DEFAULT: Self = Self {
20434        start_index: 0_i16,
20435        end_index: 0_i16,
20436        target_system: 0_u8,
20437        target_component: 0_u8,
20438        mission_type: MavMissionType::DEFAULT,
20439    };
20440    #[cfg(feature = "arbitrary")]
20441    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20442        use arbitrary::{Arbitrary, Unstructured};
20443        let mut buf = [0u8; 1024];
20444        rng.fill_bytes(&mut buf);
20445        let mut unstructured = Unstructured::new(&buf);
20446        Self::arbitrary(&mut unstructured).unwrap_or_default()
20447    }
20448}
20449impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20450    fn default() -> Self {
20451        Self::DEFAULT.clone()
20452    }
20453}
20454impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20455    type Message = MavMessage;
20456    const ID: u32 = 37u32;
20457    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20458    const EXTRA_CRC: u8 = 212u8;
20459    const ENCODED_LEN: usize = 7usize;
20460    fn deser(
20461        _version: MavlinkVersion,
20462        __input: &[u8],
20463    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20464        let avail_len = __input.len();
20465        let mut payload_buf = [0; Self::ENCODED_LEN];
20466        let mut buf = if avail_len < Self::ENCODED_LEN {
20467            payload_buf[0..avail_len].copy_from_slice(__input);
20468            Bytes::new(&payload_buf)
20469        } else {
20470            Bytes::new(__input)
20471        };
20472        let mut __struct = Self::default();
20473        __struct.start_index = buf.get_i16_le();
20474        __struct.end_index = buf.get_i16_le();
20475        __struct.target_system = buf.get_u8();
20476        __struct.target_component = buf.get_u8();
20477        let tmp = buf.get_u8();
20478        __struct.mission_type =
20479            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20480                enum_type: "MavMissionType",
20481                value: tmp as u32,
20482            })?;
20483        Ok(__struct)
20484    }
20485    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20486        let mut __tmp = BytesMut::new(bytes);
20487        #[allow(clippy::absurd_extreme_comparisons)]
20488        #[allow(unused_comparisons)]
20489        if __tmp.remaining() < Self::ENCODED_LEN {
20490            panic!(
20491                "buffer is too small (need {} bytes, but got {})",
20492                Self::ENCODED_LEN,
20493                __tmp.remaining(),
20494            )
20495        }
20496        __tmp.put_i16_le(self.start_index);
20497        __tmp.put_i16_le(self.end_index);
20498        __tmp.put_u8(self.target_system);
20499        __tmp.put_u8(self.target_component);
20500        __tmp.put_u8(self.mission_type as u8);
20501        if matches!(version, MavlinkVersion::V2) {
20502            let len = __tmp.len();
20503            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20504        } else {
20505            __tmp.len()
20506        }
20507    }
20508}
20509#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20510#[doc = "id: 41"]
20511#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20512#[derive(Debug, Clone, PartialEq)]
20513#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20515pub struct MISSION_SET_CURRENT_DATA {
20516    #[doc = "Sequence"]
20517    pub seq: u16,
20518    #[doc = "System ID"]
20519    pub target_system: u8,
20520    #[doc = "Component ID"]
20521    pub target_component: u8,
20522}
20523impl MISSION_SET_CURRENT_DATA {
20524    pub const ENCODED_LEN: usize = 4usize;
20525    pub const DEFAULT: Self = Self {
20526        seq: 0_u16,
20527        target_system: 0_u8,
20528        target_component: 0_u8,
20529    };
20530    #[cfg(feature = "arbitrary")]
20531    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20532        use arbitrary::{Arbitrary, Unstructured};
20533        let mut buf = [0u8; 1024];
20534        rng.fill_bytes(&mut buf);
20535        let mut unstructured = Unstructured::new(&buf);
20536        Self::arbitrary(&mut unstructured).unwrap_or_default()
20537    }
20538}
20539impl Default for MISSION_SET_CURRENT_DATA {
20540    fn default() -> Self {
20541        Self::DEFAULT.clone()
20542    }
20543}
20544impl MessageData for MISSION_SET_CURRENT_DATA {
20545    type Message = MavMessage;
20546    const ID: u32 = 41u32;
20547    const NAME: &'static str = "MISSION_SET_CURRENT";
20548    const EXTRA_CRC: u8 = 28u8;
20549    const ENCODED_LEN: usize = 4usize;
20550    fn deser(
20551        _version: MavlinkVersion,
20552        __input: &[u8],
20553    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20554        let avail_len = __input.len();
20555        let mut payload_buf = [0; Self::ENCODED_LEN];
20556        let mut buf = if avail_len < Self::ENCODED_LEN {
20557            payload_buf[0..avail_len].copy_from_slice(__input);
20558            Bytes::new(&payload_buf)
20559        } else {
20560            Bytes::new(__input)
20561        };
20562        let mut __struct = Self::default();
20563        __struct.seq = buf.get_u16_le();
20564        __struct.target_system = buf.get_u8();
20565        __struct.target_component = buf.get_u8();
20566        Ok(__struct)
20567    }
20568    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20569        let mut __tmp = BytesMut::new(bytes);
20570        #[allow(clippy::absurd_extreme_comparisons)]
20571        #[allow(unused_comparisons)]
20572        if __tmp.remaining() < Self::ENCODED_LEN {
20573            panic!(
20574                "buffer is too small (need {} bytes, but got {})",
20575                Self::ENCODED_LEN,
20576                __tmp.remaining(),
20577            )
20578        }
20579        __tmp.put_u16_le(self.seq);
20580        __tmp.put_u8(self.target_system);
20581        __tmp.put_u8(self.target_component);
20582        if matches!(version, MavlinkVersion::V2) {
20583            let len = __tmp.len();
20584            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20585        } else {
20586            __tmp.len()
20587        }
20588    }
20589}
20590#[doc = "id: 38"]
20591#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20592#[derive(Debug, Clone, PartialEq)]
20593#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20594#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20595pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20596    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20597    pub start_index: i16,
20598    #[doc = "End index, equal or greater than start index."]
20599    pub end_index: i16,
20600    #[doc = "System ID"]
20601    pub target_system: u8,
20602    #[doc = "Component ID"]
20603    pub target_component: u8,
20604    #[doc = "Mission type."]
20605    #[cfg_attr(feature = "serde", serde(default))]
20606    pub mission_type: MavMissionType,
20607}
20608impl MISSION_WRITE_PARTIAL_LIST_DATA {
20609    pub const ENCODED_LEN: usize = 7usize;
20610    pub const DEFAULT: Self = Self {
20611        start_index: 0_i16,
20612        end_index: 0_i16,
20613        target_system: 0_u8,
20614        target_component: 0_u8,
20615        mission_type: MavMissionType::DEFAULT,
20616    };
20617    #[cfg(feature = "arbitrary")]
20618    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20619        use arbitrary::{Arbitrary, Unstructured};
20620        let mut buf = [0u8; 1024];
20621        rng.fill_bytes(&mut buf);
20622        let mut unstructured = Unstructured::new(&buf);
20623        Self::arbitrary(&mut unstructured).unwrap_or_default()
20624    }
20625}
20626impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20627    fn default() -> Self {
20628        Self::DEFAULT.clone()
20629    }
20630}
20631impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20632    type Message = MavMessage;
20633    const ID: u32 = 38u32;
20634    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20635    const EXTRA_CRC: u8 = 9u8;
20636    const ENCODED_LEN: usize = 7usize;
20637    fn deser(
20638        _version: MavlinkVersion,
20639        __input: &[u8],
20640    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20641        let avail_len = __input.len();
20642        let mut payload_buf = [0; Self::ENCODED_LEN];
20643        let mut buf = if avail_len < Self::ENCODED_LEN {
20644            payload_buf[0..avail_len].copy_from_slice(__input);
20645            Bytes::new(&payload_buf)
20646        } else {
20647            Bytes::new(__input)
20648        };
20649        let mut __struct = Self::default();
20650        __struct.start_index = buf.get_i16_le();
20651        __struct.end_index = buf.get_i16_le();
20652        __struct.target_system = buf.get_u8();
20653        __struct.target_component = buf.get_u8();
20654        let tmp = buf.get_u8();
20655        __struct.mission_type =
20656            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20657                enum_type: "MavMissionType",
20658                value: tmp as u32,
20659            })?;
20660        Ok(__struct)
20661    }
20662    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20663        let mut __tmp = BytesMut::new(bytes);
20664        #[allow(clippy::absurd_extreme_comparisons)]
20665        #[allow(unused_comparisons)]
20666        if __tmp.remaining() < Self::ENCODED_LEN {
20667            panic!(
20668                "buffer is too small (need {} bytes, but got {})",
20669                Self::ENCODED_LEN,
20670                __tmp.remaining(),
20671            )
20672        }
20673        __tmp.put_i16_le(self.start_index);
20674        __tmp.put_i16_le(self.end_index);
20675        __tmp.put_u8(self.target_system);
20676        __tmp.put_u8(self.target_component);
20677        __tmp.put_u8(self.mission_type as u8);
20678        if matches!(version, MavlinkVersion::V2) {
20679            let len = __tmp.len();
20680            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20681        } else {
20682            __tmp.len()
20683        }
20684    }
20685}
20686#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20687#[doc = "id: 265"]
20688#[doc = "Orientation of a mount."]
20689#[derive(Debug, Clone, PartialEq)]
20690#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20692pub struct MOUNT_ORIENTATION_DATA {
20693    #[doc = "Timestamp (time since system boot)."]
20694    pub time_boot_ms: u32,
20695    #[doc = "Roll in global frame (set to NaN for invalid)."]
20696    pub roll: f32,
20697    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20698    pub pitch: f32,
20699    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20700    pub yaw: f32,
20701    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
20702    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20703    pub yaw_absolute: f32,
20704}
20705impl MOUNT_ORIENTATION_DATA {
20706    pub const ENCODED_LEN: usize = 20usize;
20707    pub const DEFAULT: Self = Self {
20708        time_boot_ms: 0_u32,
20709        roll: 0.0_f32,
20710        pitch: 0.0_f32,
20711        yaw: 0.0_f32,
20712        yaw_absolute: 0.0_f32,
20713    };
20714    #[cfg(feature = "arbitrary")]
20715    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20716        use arbitrary::{Arbitrary, Unstructured};
20717        let mut buf = [0u8; 1024];
20718        rng.fill_bytes(&mut buf);
20719        let mut unstructured = Unstructured::new(&buf);
20720        Self::arbitrary(&mut unstructured).unwrap_or_default()
20721    }
20722}
20723impl Default for MOUNT_ORIENTATION_DATA {
20724    fn default() -> Self {
20725        Self::DEFAULT.clone()
20726    }
20727}
20728impl MessageData for MOUNT_ORIENTATION_DATA {
20729    type Message = MavMessage;
20730    const ID: u32 = 265u32;
20731    const NAME: &'static str = "MOUNT_ORIENTATION";
20732    const EXTRA_CRC: u8 = 26u8;
20733    const ENCODED_LEN: usize = 20usize;
20734    fn deser(
20735        _version: MavlinkVersion,
20736        __input: &[u8],
20737    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20738        let avail_len = __input.len();
20739        let mut payload_buf = [0; Self::ENCODED_LEN];
20740        let mut buf = if avail_len < Self::ENCODED_LEN {
20741            payload_buf[0..avail_len].copy_from_slice(__input);
20742            Bytes::new(&payload_buf)
20743        } else {
20744            Bytes::new(__input)
20745        };
20746        let mut __struct = Self::default();
20747        __struct.time_boot_ms = buf.get_u32_le();
20748        __struct.roll = buf.get_f32_le();
20749        __struct.pitch = buf.get_f32_le();
20750        __struct.yaw = buf.get_f32_le();
20751        __struct.yaw_absolute = buf.get_f32_le();
20752        Ok(__struct)
20753    }
20754    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20755        let mut __tmp = BytesMut::new(bytes);
20756        #[allow(clippy::absurd_extreme_comparisons)]
20757        #[allow(unused_comparisons)]
20758        if __tmp.remaining() < Self::ENCODED_LEN {
20759            panic!(
20760                "buffer is too small (need {} bytes, but got {})",
20761                Self::ENCODED_LEN,
20762                __tmp.remaining(),
20763            )
20764        }
20765        __tmp.put_u32_le(self.time_boot_ms);
20766        __tmp.put_f32_le(self.roll);
20767        __tmp.put_f32_le(self.pitch);
20768        __tmp.put_f32_le(self.yaw);
20769        __tmp.put_f32_le(self.yaw_absolute);
20770        if matches!(version, MavlinkVersion::V2) {
20771            let len = __tmp.len();
20772            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20773        } else {
20774            __tmp.len()
20775        }
20776    }
20777}
20778#[doc = "id: 251"]
20779#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20780#[derive(Debug, Clone, PartialEq)]
20781#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20782#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20783pub struct NAMED_VALUE_FLOAT_DATA {
20784    #[doc = "Timestamp (time since system boot)."]
20785    pub time_boot_ms: u32,
20786    #[doc = "Floating point value"]
20787    pub value: f32,
20788    #[doc = "Name of the debug variable"]
20789    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20790    pub name: [u8; 10],
20791}
20792impl NAMED_VALUE_FLOAT_DATA {
20793    pub const ENCODED_LEN: usize = 18usize;
20794    pub const DEFAULT: Self = Self {
20795        time_boot_ms: 0_u32,
20796        value: 0.0_f32,
20797        name: [0_u8; 10usize],
20798    };
20799    #[cfg(feature = "arbitrary")]
20800    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20801        use arbitrary::{Arbitrary, Unstructured};
20802        let mut buf = [0u8; 1024];
20803        rng.fill_bytes(&mut buf);
20804        let mut unstructured = Unstructured::new(&buf);
20805        Self::arbitrary(&mut unstructured).unwrap_or_default()
20806    }
20807}
20808impl Default for NAMED_VALUE_FLOAT_DATA {
20809    fn default() -> Self {
20810        Self::DEFAULT.clone()
20811    }
20812}
20813impl MessageData for NAMED_VALUE_FLOAT_DATA {
20814    type Message = MavMessage;
20815    const ID: u32 = 251u32;
20816    const NAME: &'static str = "NAMED_VALUE_FLOAT";
20817    const EXTRA_CRC: u8 = 170u8;
20818    const ENCODED_LEN: usize = 18usize;
20819    fn deser(
20820        _version: MavlinkVersion,
20821        __input: &[u8],
20822    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20823        let avail_len = __input.len();
20824        let mut payload_buf = [0; Self::ENCODED_LEN];
20825        let mut buf = if avail_len < Self::ENCODED_LEN {
20826            payload_buf[0..avail_len].copy_from_slice(__input);
20827            Bytes::new(&payload_buf)
20828        } else {
20829            Bytes::new(__input)
20830        };
20831        let mut __struct = Self::default();
20832        __struct.time_boot_ms = buf.get_u32_le();
20833        __struct.value = buf.get_f32_le();
20834        for v in &mut __struct.name {
20835            let val = buf.get_u8();
20836            *v = val;
20837        }
20838        Ok(__struct)
20839    }
20840    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20841        let mut __tmp = BytesMut::new(bytes);
20842        #[allow(clippy::absurd_extreme_comparisons)]
20843        #[allow(unused_comparisons)]
20844        if __tmp.remaining() < Self::ENCODED_LEN {
20845            panic!(
20846                "buffer is too small (need {} bytes, but got {})",
20847                Self::ENCODED_LEN,
20848                __tmp.remaining(),
20849            )
20850        }
20851        __tmp.put_u32_le(self.time_boot_ms);
20852        __tmp.put_f32_le(self.value);
20853        for val in &self.name {
20854            __tmp.put_u8(*val);
20855        }
20856        if matches!(version, MavlinkVersion::V2) {
20857            let len = __tmp.len();
20858            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20859        } else {
20860            __tmp.len()
20861        }
20862    }
20863}
20864#[doc = "id: 252"]
20865#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20866#[derive(Debug, Clone, PartialEq)]
20867#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20869pub struct NAMED_VALUE_INT_DATA {
20870    #[doc = "Timestamp (time since system boot)."]
20871    pub time_boot_ms: u32,
20872    #[doc = "Signed integer value"]
20873    pub value: i32,
20874    #[doc = "Name of the debug variable"]
20875    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20876    pub name: [u8; 10],
20877}
20878impl NAMED_VALUE_INT_DATA {
20879    pub const ENCODED_LEN: usize = 18usize;
20880    pub const DEFAULT: Self = Self {
20881        time_boot_ms: 0_u32,
20882        value: 0_i32,
20883        name: [0_u8; 10usize],
20884    };
20885    #[cfg(feature = "arbitrary")]
20886    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20887        use arbitrary::{Arbitrary, Unstructured};
20888        let mut buf = [0u8; 1024];
20889        rng.fill_bytes(&mut buf);
20890        let mut unstructured = Unstructured::new(&buf);
20891        Self::arbitrary(&mut unstructured).unwrap_or_default()
20892    }
20893}
20894impl Default for NAMED_VALUE_INT_DATA {
20895    fn default() -> Self {
20896        Self::DEFAULT.clone()
20897    }
20898}
20899impl MessageData for NAMED_VALUE_INT_DATA {
20900    type Message = MavMessage;
20901    const ID: u32 = 252u32;
20902    const NAME: &'static str = "NAMED_VALUE_INT";
20903    const EXTRA_CRC: u8 = 44u8;
20904    const ENCODED_LEN: usize = 18usize;
20905    fn deser(
20906        _version: MavlinkVersion,
20907        __input: &[u8],
20908    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20909        let avail_len = __input.len();
20910        let mut payload_buf = [0; Self::ENCODED_LEN];
20911        let mut buf = if avail_len < Self::ENCODED_LEN {
20912            payload_buf[0..avail_len].copy_from_slice(__input);
20913            Bytes::new(&payload_buf)
20914        } else {
20915            Bytes::new(__input)
20916        };
20917        let mut __struct = Self::default();
20918        __struct.time_boot_ms = buf.get_u32_le();
20919        __struct.value = buf.get_i32_le();
20920        for v in &mut __struct.name {
20921            let val = buf.get_u8();
20922            *v = val;
20923        }
20924        Ok(__struct)
20925    }
20926    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20927        let mut __tmp = BytesMut::new(bytes);
20928        #[allow(clippy::absurd_extreme_comparisons)]
20929        #[allow(unused_comparisons)]
20930        if __tmp.remaining() < Self::ENCODED_LEN {
20931            panic!(
20932                "buffer is too small (need {} bytes, but got {})",
20933                Self::ENCODED_LEN,
20934                __tmp.remaining(),
20935            )
20936        }
20937        __tmp.put_u32_le(self.time_boot_ms);
20938        __tmp.put_i32_le(self.value);
20939        for val in &self.name {
20940            __tmp.put_u8(*val);
20941        }
20942        if matches!(version, MavlinkVersion::V2) {
20943            let len = __tmp.len();
20944            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20945        } else {
20946            __tmp.len()
20947        }
20948    }
20949}
20950#[doc = "id: 62"]
20951#[doc = "The state of the navigation and position controller."]
20952#[derive(Debug, Clone, PartialEq)]
20953#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20954#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20955pub struct NAV_CONTROLLER_OUTPUT_DATA {
20956    #[doc = "Current desired roll"]
20957    pub nav_roll: f32,
20958    #[doc = "Current desired pitch"]
20959    pub nav_pitch: f32,
20960    #[doc = "Current altitude error"]
20961    pub alt_error: f32,
20962    #[doc = "Current airspeed error"]
20963    pub aspd_error: f32,
20964    #[doc = "Current crosstrack error on x-y plane"]
20965    pub xtrack_error: f32,
20966    #[doc = "Current desired heading"]
20967    pub nav_bearing: i16,
20968    #[doc = "Bearing to current waypoint/target"]
20969    pub target_bearing: i16,
20970    #[doc = "Distance to active waypoint"]
20971    pub wp_dist: u16,
20972}
20973impl NAV_CONTROLLER_OUTPUT_DATA {
20974    pub const ENCODED_LEN: usize = 26usize;
20975    pub const DEFAULT: Self = Self {
20976        nav_roll: 0.0_f32,
20977        nav_pitch: 0.0_f32,
20978        alt_error: 0.0_f32,
20979        aspd_error: 0.0_f32,
20980        xtrack_error: 0.0_f32,
20981        nav_bearing: 0_i16,
20982        target_bearing: 0_i16,
20983        wp_dist: 0_u16,
20984    };
20985    #[cfg(feature = "arbitrary")]
20986    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20987        use arbitrary::{Arbitrary, Unstructured};
20988        let mut buf = [0u8; 1024];
20989        rng.fill_bytes(&mut buf);
20990        let mut unstructured = Unstructured::new(&buf);
20991        Self::arbitrary(&mut unstructured).unwrap_or_default()
20992    }
20993}
20994impl Default for NAV_CONTROLLER_OUTPUT_DATA {
20995    fn default() -> Self {
20996        Self::DEFAULT.clone()
20997    }
20998}
20999impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
21000    type Message = MavMessage;
21001    const ID: u32 = 62u32;
21002    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
21003    const EXTRA_CRC: u8 = 183u8;
21004    const ENCODED_LEN: usize = 26usize;
21005    fn deser(
21006        _version: MavlinkVersion,
21007        __input: &[u8],
21008    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21009        let avail_len = __input.len();
21010        let mut payload_buf = [0; Self::ENCODED_LEN];
21011        let mut buf = if avail_len < Self::ENCODED_LEN {
21012            payload_buf[0..avail_len].copy_from_slice(__input);
21013            Bytes::new(&payload_buf)
21014        } else {
21015            Bytes::new(__input)
21016        };
21017        let mut __struct = Self::default();
21018        __struct.nav_roll = buf.get_f32_le();
21019        __struct.nav_pitch = buf.get_f32_le();
21020        __struct.alt_error = buf.get_f32_le();
21021        __struct.aspd_error = buf.get_f32_le();
21022        __struct.xtrack_error = buf.get_f32_le();
21023        __struct.nav_bearing = buf.get_i16_le();
21024        __struct.target_bearing = buf.get_i16_le();
21025        __struct.wp_dist = buf.get_u16_le();
21026        Ok(__struct)
21027    }
21028    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21029        let mut __tmp = BytesMut::new(bytes);
21030        #[allow(clippy::absurd_extreme_comparisons)]
21031        #[allow(unused_comparisons)]
21032        if __tmp.remaining() < Self::ENCODED_LEN {
21033            panic!(
21034                "buffer is too small (need {} bytes, but got {})",
21035                Self::ENCODED_LEN,
21036                __tmp.remaining(),
21037            )
21038        }
21039        __tmp.put_f32_le(self.nav_roll);
21040        __tmp.put_f32_le(self.nav_pitch);
21041        __tmp.put_f32_le(self.alt_error);
21042        __tmp.put_f32_le(self.aspd_error);
21043        __tmp.put_f32_le(self.xtrack_error);
21044        __tmp.put_i16_le(self.nav_bearing);
21045        __tmp.put_i16_le(self.target_bearing);
21046        __tmp.put_u16_le(self.wp_dist);
21047        if matches!(version, MavlinkVersion::V2) {
21048            let len = __tmp.len();
21049            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21050        } else {
21051            __tmp.len()
21052        }
21053    }
21054}
21055#[doc = "id: 330"]
21056#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21057#[derive(Debug, Clone, PartialEq)]
21058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21060pub struct OBSTACLE_DISTANCE_DATA {
21061    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21062    pub time_usec: u64,
21063    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21064    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21065    pub distances: [u16; 72],
21066    #[doc = "Minimum distance the sensor can measure."]
21067    pub min_distance: u16,
21068    #[doc = "Maximum distance the sensor can measure."]
21069    pub max_distance: u16,
21070    #[doc = "Class id of the distance sensor type."]
21071    pub sensor_type: MavDistanceSensor,
21072    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21073    pub increment: u8,
21074    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21075    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21076    pub increment_f: f32,
21077    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21078    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21079    pub angle_offset: f32,
21080    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21081    #[cfg_attr(feature = "serde", serde(default))]
21082    pub frame: MavFrame,
21083}
21084impl OBSTACLE_DISTANCE_DATA {
21085    pub const ENCODED_LEN: usize = 167usize;
21086    pub const DEFAULT: Self = Self {
21087        time_usec: 0_u64,
21088        distances: [0_u16; 72usize],
21089        min_distance: 0_u16,
21090        max_distance: 0_u16,
21091        sensor_type: MavDistanceSensor::DEFAULT,
21092        increment: 0_u8,
21093        increment_f: 0.0_f32,
21094        angle_offset: 0.0_f32,
21095        frame: MavFrame::DEFAULT,
21096    };
21097    #[cfg(feature = "arbitrary")]
21098    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21099        use arbitrary::{Arbitrary, Unstructured};
21100        let mut buf = [0u8; 1024];
21101        rng.fill_bytes(&mut buf);
21102        let mut unstructured = Unstructured::new(&buf);
21103        Self::arbitrary(&mut unstructured).unwrap_or_default()
21104    }
21105}
21106impl Default for OBSTACLE_DISTANCE_DATA {
21107    fn default() -> Self {
21108        Self::DEFAULT.clone()
21109    }
21110}
21111impl MessageData for OBSTACLE_DISTANCE_DATA {
21112    type Message = MavMessage;
21113    const ID: u32 = 330u32;
21114    const NAME: &'static str = "OBSTACLE_DISTANCE";
21115    const EXTRA_CRC: u8 = 23u8;
21116    const ENCODED_LEN: usize = 167usize;
21117    fn deser(
21118        _version: MavlinkVersion,
21119        __input: &[u8],
21120    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21121        let avail_len = __input.len();
21122        let mut payload_buf = [0; Self::ENCODED_LEN];
21123        let mut buf = if avail_len < Self::ENCODED_LEN {
21124            payload_buf[0..avail_len].copy_from_slice(__input);
21125            Bytes::new(&payload_buf)
21126        } else {
21127            Bytes::new(__input)
21128        };
21129        let mut __struct = Self::default();
21130        __struct.time_usec = buf.get_u64_le();
21131        for v in &mut __struct.distances {
21132            let val = buf.get_u16_le();
21133            *v = val;
21134        }
21135        __struct.min_distance = buf.get_u16_le();
21136        __struct.max_distance = buf.get_u16_le();
21137        let tmp = buf.get_u8();
21138        __struct.sensor_type =
21139            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21140                enum_type: "MavDistanceSensor",
21141                value: tmp as u32,
21142            })?;
21143        __struct.increment = buf.get_u8();
21144        __struct.increment_f = buf.get_f32_le();
21145        __struct.angle_offset = buf.get_f32_le();
21146        let tmp = buf.get_u8();
21147        __struct.frame =
21148            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21149                enum_type: "MavFrame",
21150                value: tmp as u32,
21151            })?;
21152        Ok(__struct)
21153    }
21154    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21155        let mut __tmp = BytesMut::new(bytes);
21156        #[allow(clippy::absurd_extreme_comparisons)]
21157        #[allow(unused_comparisons)]
21158        if __tmp.remaining() < Self::ENCODED_LEN {
21159            panic!(
21160                "buffer is too small (need {} bytes, but got {})",
21161                Self::ENCODED_LEN,
21162                __tmp.remaining(),
21163            )
21164        }
21165        __tmp.put_u64_le(self.time_usec);
21166        for val in &self.distances {
21167            __tmp.put_u16_le(*val);
21168        }
21169        __tmp.put_u16_le(self.min_distance);
21170        __tmp.put_u16_le(self.max_distance);
21171        __tmp.put_u8(self.sensor_type as u8);
21172        __tmp.put_u8(self.increment);
21173        __tmp.put_f32_le(self.increment_f);
21174        __tmp.put_f32_le(self.angle_offset);
21175        __tmp.put_u8(self.frame as u8);
21176        if matches!(version, MavlinkVersion::V2) {
21177            let len = __tmp.len();
21178            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21179        } else {
21180            __tmp.len()
21181        }
21182    }
21183}
21184#[doc = "id: 331"]
21185#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21186#[derive(Debug, Clone, PartialEq)]
21187#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21188#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21189pub struct ODOMETRY_DATA {
21190    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21191    pub time_usec: u64,
21192    #[doc = "X Position"]
21193    pub x: f32,
21194    #[doc = "Y Position"]
21195    pub y: f32,
21196    #[doc = "Z Position"]
21197    pub z: f32,
21198    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21199    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21200    pub q: [f32; 4],
21201    #[doc = "X linear speed"]
21202    pub vx: f32,
21203    #[doc = "Y linear speed"]
21204    pub vy: f32,
21205    #[doc = "Z linear speed"]
21206    pub vz: f32,
21207    #[doc = "Roll angular speed"]
21208    pub rollspeed: f32,
21209    #[doc = "Pitch angular speed"]
21210    pub pitchspeed: f32,
21211    #[doc = "Yaw angular speed"]
21212    pub yawspeed: f32,
21213    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21214    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21215    pub pose_covariance: [f32; 21],
21216    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21217    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21218    pub velocity_covariance: [f32; 21],
21219    #[doc = "Coordinate frame of reference for the pose data."]
21220    pub frame_id: MavFrame,
21221    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21222    pub child_frame_id: MavFrame,
21223    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21224    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21225    pub reset_counter: u8,
21226    #[doc = "Type of estimator that is providing the odometry."]
21227    #[cfg_attr(feature = "serde", serde(default))]
21228    pub estimator_type: MavEstimatorType,
21229    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21230    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21231    pub quality: i8,
21232}
21233impl ODOMETRY_DATA {
21234    pub const ENCODED_LEN: usize = 233usize;
21235    pub const DEFAULT: Self = Self {
21236        time_usec: 0_u64,
21237        x: 0.0_f32,
21238        y: 0.0_f32,
21239        z: 0.0_f32,
21240        q: [0.0_f32; 4usize],
21241        vx: 0.0_f32,
21242        vy: 0.0_f32,
21243        vz: 0.0_f32,
21244        rollspeed: 0.0_f32,
21245        pitchspeed: 0.0_f32,
21246        yawspeed: 0.0_f32,
21247        pose_covariance: [0.0_f32; 21usize],
21248        velocity_covariance: [0.0_f32; 21usize],
21249        frame_id: MavFrame::DEFAULT,
21250        child_frame_id: MavFrame::DEFAULT,
21251        reset_counter: 0_u8,
21252        estimator_type: MavEstimatorType::DEFAULT,
21253        quality: 0_i8,
21254    };
21255    #[cfg(feature = "arbitrary")]
21256    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21257        use arbitrary::{Arbitrary, Unstructured};
21258        let mut buf = [0u8; 1024];
21259        rng.fill_bytes(&mut buf);
21260        let mut unstructured = Unstructured::new(&buf);
21261        Self::arbitrary(&mut unstructured).unwrap_or_default()
21262    }
21263}
21264impl Default for ODOMETRY_DATA {
21265    fn default() -> Self {
21266        Self::DEFAULT.clone()
21267    }
21268}
21269impl MessageData for ODOMETRY_DATA {
21270    type Message = MavMessage;
21271    const ID: u32 = 331u32;
21272    const NAME: &'static str = "ODOMETRY";
21273    const EXTRA_CRC: u8 = 91u8;
21274    const ENCODED_LEN: usize = 233usize;
21275    fn deser(
21276        _version: MavlinkVersion,
21277        __input: &[u8],
21278    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21279        let avail_len = __input.len();
21280        let mut payload_buf = [0; Self::ENCODED_LEN];
21281        let mut buf = if avail_len < Self::ENCODED_LEN {
21282            payload_buf[0..avail_len].copy_from_slice(__input);
21283            Bytes::new(&payload_buf)
21284        } else {
21285            Bytes::new(__input)
21286        };
21287        let mut __struct = Self::default();
21288        __struct.time_usec = buf.get_u64_le();
21289        __struct.x = buf.get_f32_le();
21290        __struct.y = buf.get_f32_le();
21291        __struct.z = buf.get_f32_le();
21292        for v in &mut __struct.q {
21293            let val = buf.get_f32_le();
21294            *v = val;
21295        }
21296        __struct.vx = buf.get_f32_le();
21297        __struct.vy = buf.get_f32_le();
21298        __struct.vz = buf.get_f32_le();
21299        __struct.rollspeed = buf.get_f32_le();
21300        __struct.pitchspeed = buf.get_f32_le();
21301        __struct.yawspeed = buf.get_f32_le();
21302        for v in &mut __struct.pose_covariance {
21303            let val = buf.get_f32_le();
21304            *v = val;
21305        }
21306        for v in &mut __struct.velocity_covariance {
21307            let val = buf.get_f32_le();
21308            *v = val;
21309        }
21310        let tmp = buf.get_u8();
21311        __struct.frame_id =
21312            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21313                enum_type: "MavFrame",
21314                value: tmp as u32,
21315            })?;
21316        let tmp = buf.get_u8();
21317        __struct.child_frame_id =
21318            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21319                enum_type: "MavFrame",
21320                value: tmp as u32,
21321            })?;
21322        __struct.reset_counter = buf.get_u8();
21323        let tmp = buf.get_u8();
21324        __struct.estimator_type =
21325            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21326                enum_type: "MavEstimatorType",
21327                value: tmp as u32,
21328            })?;
21329        __struct.quality = buf.get_i8();
21330        Ok(__struct)
21331    }
21332    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21333        let mut __tmp = BytesMut::new(bytes);
21334        #[allow(clippy::absurd_extreme_comparisons)]
21335        #[allow(unused_comparisons)]
21336        if __tmp.remaining() < Self::ENCODED_LEN {
21337            panic!(
21338                "buffer is too small (need {} bytes, but got {})",
21339                Self::ENCODED_LEN,
21340                __tmp.remaining(),
21341            )
21342        }
21343        __tmp.put_u64_le(self.time_usec);
21344        __tmp.put_f32_le(self.x);
21345        __tmp.put_f32_le(self.y);
21346        __tmp.put_f32_le(self.z);
21347        for val in &self.q {
21348            __tmp.put_f32_le(*val);
21349        }
21350        __tmp.put_f32_le(self.vx);
21351        __tmp.put_f32_le(self.vy);
21352        __tmp.put_f32_le(self.vz);
21353        __tmp.put_f32_le(self.rollspeed);
21354        __tmp.put_f32_le(self.pitchspeed);
21355        __tmp.put_f32_le(self.yawspeed);
21356        for val in &self.pose_covariance {
21357            __tmp.put_f32_le(*val);
21358        }
21359        for val in &self.velocity_covariance {
21360            __tmp.put_f32_le(*val);
21361        }
21362        __tmp.put_u8(self.frame_id as u8);
21363        __tmp.put_u8(self.child_frame_id as u8);
21364        __tmp.put_u8(self.reset_counter);
21365        __tmp.put_u8(self.estimator_type as u8);
21366        __tmp.put_i8(self.quality);
21367        if matches!(version, MavlinkVersion::V2) {
21368            let len = __tmp.len();
21369            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21370        } else {
21371            __tmp.len()
21372        }
21373    }
21374}
21375#[doc = "id: 390"]
21376#[doc = "Hardware status sent by an onboard computer."]
21377#[derive(Debug, Clone, PartialEq)]
21378#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21379#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21380pub struct ONBOARD_COMPUTER_STATUS_DATA {
21381    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21382    pub time_usec: u64,
21383    #[doc = "Time since system boot."]
21384    pub uptime: u32,
21385    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21386    pub ram_usage: u32,
21387    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21388    pub ram_total: u32,
21389    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21390    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21391    pub storage_type: [u32; 4],
21392    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21393    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21394    pub storage_usage: [u32; 4],
21395    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21396    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21397    pub storage_total: [u32; 4],
21398    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21399    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21400    pub link_type: [u32; 6],
21401    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21402    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21403    pub link_tx_rate: [u32; 6],
21404    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21405    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21406    pub link_rx_rate: [u32; 6],
21407    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21408    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21409    pub link_tx_max: [u32; 6],
21410    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21411    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21412    pub link_rx_max: [u32; 6],
21413    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21414    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21415    pub fan_speed: [i16; 4],
21416    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21417    pub mavtype: u8,
21418    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21419    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21420    pub cpu_cores: [u8; 8],
21421    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21422    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21423    pub cpu_combined: [u8; 10],
21424    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21425    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21426    pub gpu_cores: [u8; 4],
21427    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21428    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21429    pub gpu_combined: [u8; 10],
21430    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21431    pub temperature_board: i8,
21432    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21433    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21434    pub temperature_core: [i8; 8],
21435}
21436impl ONBOARD_COMPUTER_STATUS_DATA {
21437    pub const ENCODED_LEN: usize = 238usize;
21438    pub const DEFAULT: Self = Self {
21439        time_usec: 0_u64,
21440        uptime: 0_u32,
21441        ram_usage: 0_u32,
21442        ram_total: 0_u32,
21443        storage_type: [0_u32; 4usize],
21444        storage_usage: [0_u32; 4usize],
21445        storage_total: [0_u32; 4usize],
21446        link_type: [0_u32; 6usize],
21447        link_tx_rate: [0_u32; 6usize],
21448        link_rx_rate: [0_u32; 6usize],
21449        link_tx_max: [0_u32; 6usize],
21450        link_rx_max: [0_u32; 6usize],
21451        fan_speed: [0_i16; 4usize],
21452        mavtype: 0_u8,
21453        cpu_cores: [0_u8; 8usize],
21454        cpu_combined: [0_u8; 10usize],
21455        gpu_cores: [0_u8; 4usize],
21456        gpu_combined: [0_u8; 10usize],
21457        temperature_board: 0_i8,
21458        temperature_core: [0_i8; 8usize],
21459    };
21460    #[cfg(feature = "arbitrary")]
21461    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21462        use arbitrary::{Arbitrary, Unstructured};
21463        let mut buf = [0u8; 1024];
21464        rng.fill_bytes(&mut buf);
21465        let mut unstructured = Unstructured::new(&buf);
21466        Self::arbitrary(&mut unstructured).unwrap_or_default()
21467    }
21468}
21469impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21470    fn default() -> Self {
21471        Self::DEFAULT.clone()
21472    }
21473}
21474impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21475    type Message = MavMessage;
21476    const ID: u32 = 390u32;
21477    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21478    const EXTRA_CRC: u8 = 156u8;
21479    const ENCODED_LEN: usize = 238usize;
21480    fn deser(
21481        _version: MavlinkVersion,
21482        __input: &[u8],
21483    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21484        let avail_len = __input.len();
21485        let mut payload_buf = [0; Self::ENCODED_LEN];
21486        let mut buf = if avail_len < Self::ENCODED_LEN {
21487            payload_buf[0..avail_len].copy_from_slice(__input);
21488            Bytes::new(&payload_buf)
21489        } else {
21490            Bytes::new(__input)
21491        };
21492        let mut __struct = Self::default();
21493        __struct.time_usec = buf.get_u64_le();
21494        __struct.uptime = buf.get_u32_le();
21495        __struct.ram_usage = buf.get_u32_le();
21496        __struct.ram_total = buf.get_u32_le();
21497        for v in &mut __struct.storage_type {
21498            let val = buf.get_u32_le();
21499            *v = val;
21500        }
21501        for v in &mut __struct.storage_usage {
21502            let val = buf.get_u32_le();
21503            *v = val;
21504        }
21505        for v in &mut __struct.storage_total {
21506            let val = buf.get_u32_le();
21507            *v = val;
21508        }
21509        for v in &mut __struct.link_type {
21510            let val = buf.get_u32_le();
21511            *v = val;
21512        }
21513        for v in &mut __struct.link_tx_rate {
21514            let val = buf.get_u32_le();
21515            *v = val;
21516        }
21517        for v in &mut __struct.link_rx_rate {
21518            let val = buf.get_u32_le();
21519            *v = val;
21520        }
21521        for v in &mut __struct.link_tx_max {
21522            let val = buf.get_u32_le();
21523            *v = val;
21524        }
21525        for v in &mut __struct.link_rx_max {
21526            let val = buf.get_u32_le();
21527            *v = val;
21528        }
21529        for v in &mut __struct.fan_speed {
21530            let val = buf.get_i16_le();
21531            *v = val;
21532        }
21533        __struct.mavtype = buf.get_u8();
21534        for v in &mut __struct.cpu_cores {
21535            let val = buf.get_u8();
21536            *v = val;
21537        }
21538        for v in &mut __struct.cpu_combined {
21539            let val = buf.get_u8();
21540            *v = val;
21541        }
21542        for v in &mut __struct.gpu_cores {
21543            let val = buf.get_u8();
21544            *v = val;
21545        }
21546        for v in &mut __struct.gpu_combined {
21547            let val = buf.get_u8();
21548            *v = val;
21549        }
21550        __struct.temperature_board = buf.get_i8();
21551        for v in &mut __struct.temperature_core {
21552            let val = buf.get_i8();
21553            *v = val;
21554        }
21555        Ok(__struct)
21556    }
21557    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21558        let mut __tmp = BytesMut::new(bytes);
21559        #[allow(clippy::absurd_extreme_comparisons)]
21560        #[allow(unused_comparisons)]
21561        if __tmp.remaining() < Self::ENCODED_LEN {
21562            panic!(
21563                "buffer is too small (need {} bytes, but got {})",
21564                Self::ENCODED_LEN,
21565                __tmp.remaining(),
21566            )
21567        }
21568        __tmp.put_u64_le(self.time_usec);
21569        __tmp.put_u32_le(self.uptime);
21570        __tmp.put_u32_le(self.ram_usage);
21571        __tmp.put_u32_le(self.ram_total);
21572        for val in &self.storage_type {
21573            __tmp.put_u32_le(*val);
21574        }
21575        for val in &self.storage_usage {
21576            __tmp.put_u32_le(*val);
21577        }
21578        for val in &self.storage_total {
21579            __tmp.put_u32_le(*val);
21580        }
21581        for val in &self.link_type {
21582            __tmp.put_u32_le(*val);
21583        }
21584        for val in &self.link_tx_rate {
21585            __tmp.put_u32_le(*val);
21586        }
21587        for val in &self.link_rx_rate {
21588            __tmp.put_u32_le(*val);
21589        }
21590        for val in &self.link_tx_max {
21591            __tmp.put_u32_le(*val);
21592        }
21593        for val in &self.link_rx_max {
21594            __tmp.put_u32_le(*val);
21595        }
21596        for val in &self.fan_speed {
21597            __tmp.put_i16_le(*val);
21598        }
21599        __tmp.put_u8(self.mavtype);
21600        for val in &self.cpu_cores {
21601            __tmp.put_u8(*val);
21602        }
21603        for val in &self.cpu_combined {
21604            __tmp.put_u8(*val);
21605        }
21606        for val in &self.gpu_cores {
21607            __tmp.put_u8(*val);
21608        }
21609        for val in &self.gpu_combined {
21610            __tmp.put_u8(*val);
21611        }
21612        __tmp.put_i8(self.temperature_board);
21613        for val in &self.temperature_core {
21614            __tmp.put_i8(*val);
21615        }
21616        if matches!(version, MavlinkVersion::V2) {
21617            let len = __tmp.len();
21618            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21619        } else {
21620            __tmp.len()
21621        }
21622    }
21623}
21624#[doc = "id: 12918"]
21625#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21626#[derive(Debug, Clone, PartialEq)]
21627#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21628#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21629pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21630    #[doc = "Status level indicating if arming is allowed."]
21631    pub status: MavOdidArmStatus,
21632    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21633    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21634    pub error: [u8; 50],
21635}
21636impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21637    pub const ENCODED_LEN: usize = 51usize;
21638    pub const DEFAULT: Self = Self {
21639        status: MavOdidArmStatus::DEFAULT,
21640        error: [0_u8; 50usize],
21641    };
21642    #[cfg(feature = "arbitrary")]
21643    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21644        use arbitrary::{Arbitrary, Unstructured};
21645        let mut buf = [0u8; 1024];
21646        rng.fill_bytes(&mut buf);
21647        let mut unstructured = Unstructured::new(&buf);
21648        Self::arbitrary(&mut unstructured).unwrap_or_default()
21649    }
21650}
21651impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21652    fn default() -> Self {
21653        Self::DEFAULT.clone()
21654    }
21655}
21656impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21657    type Message = MavMessage;
21658    const ID: u32 = 12918u32;
21659    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21660    const EXTRA_CRC: u8 = 139u8;
21661    const ENCODED_LEN: usize = 51usize;
21662    fn deser(
21663        _version: MavlinkVersion,
21664        __input: &[u8],
21665    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21666        let avail_len = __input.len();
21667        let mut payload_buf = [0; Self::ENCODED_LEN];
21668        let mut buf = if avail_len < Self::ENCODED_LEN {
21669            payload_buf[0..avail_len].copy_from_slice(__input);
21670            Bytes::new(&payload_buf)
21671        } else {
21672            Bytes::new(__input)
21673        };
21674        let mut __struct = Self::default();
21675        let tmp = buf.get_u8();
21676        __struct.status =
21677            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21678                enum_type: "MavOdidArmStatus",
21679                value: tmp as u32,
21680            })?;
21681        for v in &mut __struct.error {
21682            let val = buf.get_u8();
21683            *v = val;
21684        }
21685        Ok(__struct)
21686    }
21687    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21688        let mut __tmp = BytesMut::new(bytes);
21689        #[allow(clippy::absurd_extreme_comparisons)]
21690        #[allow(unused_comparisons)]
21691        if __tmp.remaining() < Self::ENCODED_LEN {
21692            panic!(
21693                "buffer is too small (need {} bytes, but got {})",
21694                Self::ENCODED_LEN,
21695                __tmp.remaining(),
21696            )
21697        }
21698        __tmp.put_u8(self.status as u8);
21699        for val in &self.error {
21700            __tmp.put_u8(*val);
21701        }
21702        if matches!(version, MavlinkVersion::V2) {
21703            let len = __tmp.len();
21704            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21705        } else {
21706            __tmp.len()
21707        }
21708    }
21709}
21710#[doc = "id: 12902"]
21711#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
21712#[derive(Debug, Clone, PartialEq)]
21713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21715pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
21716    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21717    pub timestamp: u32,
21718    #[doc = "System ID (0 for broadcast)."]
21719    pub target_system: u8,
21720    #[doc = "Component ID (0 for broadcast)."]
21721    pub target_component: u8,
21722    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21723    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21724    pub id_or_mac: [u8; 20],
21725    #[doc = "Indicates the type of authentication."]
21726    pub authentication_type: MavOdidAuthType,
21727    #[doc = "Allowed range is 0 - 15."]
21728    pub data_page: u8,
21729    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21730    pub last_page_index: u8,
21731    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21732    pub length: u8,
21733    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
21734    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21735    pub authentication_data: [u8; 23],
21736}
21737impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
21738    pub const ENCODED_LEN: usize = 53usize;
21739    pub const DEFAULT: Self = Self {
21740        timestamp: 0_u32,
21741        target_system: 0_u8,
21742        target_component: 0_u8,
21743        id_or_mac: [0_u8; 20usize],
21744        authentication_type: MavOdidAuthType::DEFAULT,
21745        data_page: 0_u8,
21746        last_page_index: 0_u8,
21747        length: 0_u8,
21748        authentication_data: [0_u8; 23usize],
21749    };
21750    #[cfg(feature = "arbitrary")]
21751    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21752        use arbitrary::{Arbitrary, Unstructured};
21753        let mut buf = [0u8; 1024];
21754        rng.fill_bytes(&mut buf);
21755        let mut unstructured = Unstructured::new(&buf);
21756        Self::arbitrary(&mut unstructured).unwrap_or_default()
21757    }
21758}
21759impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21760    fn default() -> Self {
21761        Self::DEFAULT.clone()
21762    }
21763}
21764impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21765    type Message = MavMessage;
21766    const ID: u32 = 12902u32;
21767    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
21768    const EXTRA_CRC: u8 = 140u8;
21769    const ENCODED_LEN: usize = 53usize;
21770    fn deser(
21771        _version: MavlinkVersion,
21772        __input: &[u8],
21773    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21774        let avail_len = __input.len();
21775        let mut payload_buf = [0; Self::ENCODED_LEN];
21776        let mut buf = if avail_len < Self::ENCODED_LEN {
21777            payload_buf[0..avail_len].copy_from_slice(__input);
21778            Bytes::new(&payload_buf)
21779        } else {
21780            Bytes::new(__input)
21781        };
21782        let mut __struct = Self::default();
21783        __struct.timestamp = buf.get_u32_le();
21784        __struct.target_system = buf.get_u8();
21785        __struct.target_component = buf.get_u8();
21786        for v in &mut __struct.id_or_mac {
21787            let val = buf.get_u8();
21788            *v = val;
21789        }
21790        let tmp = buf.get_u8();
21791        __struct.authentication_type =
21792            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21793                enum_type: "MavOdidAuthType",
21794                value: tmp as u32,
21795            })?;
21796        __struct.data_page = buf.get_u8();
21797        __struct.last_page_index = buf.get_u8();
21798        __struct.length = buf.get_u8();
21799        for v in &mut __struct.authentication_data {
21800            let val = buf.get_u8();
21801            *v = val;
21802        }
21803        Ok(__struct)
21804    }
21805    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21806        let mut __tmp = BytesMut::new(bytes);
21807        #[allow(clippy::absurd_extreme_comparisons)]
21808        #[allow(unused_comparisons)]
21809        if __tmp.remaining() < Self::ENCODED_LEN {
21810            panic!(
21811                "buffer is too small (need {} bytes, but got {})",
21812                Self::ENCODED_LEN,
21813                __tmp.remaining(),
21814            )
21815        }
21816        __tmp.put_u32_le(self.timestamp);
21817        __tmp.put_u8(self.target_system);
21818        __tmp.put_u8(self.target_component);
21819        for val in &self.id_or_mac {
21820            __tmp.put_u8(*val);
21821        }
21822        __tmp.put_u8(self.authentication_type as u8);
21823        __tmp.put_u8(self.data_page);
21824        __tmp.put_u8(self.last_page_index);
21825        __tmp.put_u8(self.length);
21826        for val in &self.authentication_data {
21827            __tmp.put_u8(*val);
21828        }
21829        if matches!(version, MavlinkVersion::V2) {
21830            let len = __tmp.len();
21831            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21832        } else {
21833            __tmp.len()
21834        }
21835    }
21836}
21837#[doc = "id: 12900"]
21838#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
21839#[derive(Debug, Clone, PartialEq)]
21840#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21841#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21842pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
21843    #[doc = "System ID (0 for broadcast)."]
21844    pub target_system: u8,
21845    #[doc = "Component ID (0 for broadcast)."]
21846    pub target_component: u8,
21847    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21848    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21849    pub id_or_mac: [u8; 20],
21850    #[doc = "Indicates the format for the uas_id field of this message."]
21851    pub id_type: MavOdidIdType,
21852    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
21853    pub ua_type: MavOdidUaType,
21854    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
21855    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21856    pub uas_id: [u8; 20],
21857}
21858impl OPEN_DRONE_ID_BASIC_ID_DATA {
21859    pub const ENCODED_LEN: usize = 44usize;
21860    pub const DEFAULT: Self = Self {
21861        target_system: 0_u8,
21862        target_component: 0_u8,
21863        id_or_mac: [0_u8; 20usize],
21864        id_type: MavOdidIdType::DEFAULT,
21865        ua_type: MavOdidUaType::DEFAULT,
21866        uas_id: [0_u8; 20usize],
21867    };
21868    #[cfg(feature = "arbitrary")]
21869    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21870        use arbitrary::{Arbitrary, Unstructured};
21871        let mut buf = [0u8; 1024];
21872        rng.fill_bytes(&mut buf);
21873        let mut unstructured = Unstructured::new(&buf);
21874        Self::arbitrary(&mut unstructured).unwrap_or_default()
21875    }
21876}
21877impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
21878    fn default() -> Self {
21879        Self::DEFAULT.clone()
21880    }
21881}
21882impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
21883    type Message = MavMessage;
21884    const ID: u32 = 12900u32;
21885    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
21886    const EXTRA_CRC: u8 = 114u8;
21887    const ENCODED_LEN: usize = 44usize;
21888    fn deser(
21889        _version: MavlinkVersion,
21890        __input: &[u8],
21891    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21892        let avail_len = __input.len();
21893        let mut payload_buf = [0; Self::ENCODED_LEN];
21894        let mut buf = if avail_len < Self::ENCODED_LEN {
21895            payload_buf[0..avail_len].copy_from_slice(__input);
21896            Bytes::new(&payload_buf)
21897        } else {
21898            Bytes::new(__input)
21899        };
21900        let mut __struct = Self::default();
21901        __struct.target_system = buf.get_u8();
21902        __struct.target_component = buf.get_u8();
21903        for v in &mut __struct.id_or_mac {
21904            let val = buf.get_u8();
21905            *v = val;
21906        }
21907        let tmp = buf.get_u8();
21908        __struct.id_type =
21909            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21910                enum_type: "MavOdidIdType",
21911                value: tmp as u32,
21912            })?;
21913        let tmp = buf.get_u8();
21914        __struct.ua_type =
21915            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21916                enum_type: "MavOdidUaType",
21917                value: tmp as u32,
21918            })?;
21919        for v in &mut __struct.uas_id {
21920            let val = buf.get_u8();
21921            *v = val;
21922        }
21923        Ok(__struct)
21924    }
21925    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21926        let mut __tmp = BytesMut::new(bytes);
21927        #[allow(clippy::absurd_extreme_comparisons)]
21928        #[allow(unused_comparisons)]
21929        if __tmp.remaining() < Self::ENCODED_LEN {
21930            panic!(
21931                "buffer is too small (need {} bytes, but got {})",
21932                Self::ENCODED_LEN,
21933                __tmp.remaining(),
21934            )
21935        }
21936        __tmp.put_u8(self.target_system);
21937        __tmp.put_u8(self.target_component);
21938        for val in &self.id_or_mac {
21939            __tmp.put_u8(*val);
21940        }
21941        __tmp.put_u8(self.id_type as u8);
21942        __tmp.put_u8(self.ua_type as u8);
21943        for val in &self.uas_id {
21944            __tmp.put_u8(*val);
21945        }
21946        if matches!(version, MavlinkVersion::V2) {
21947            let len = __tmp.len();
21948            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21949        } else {
21950            __tmp.len()
21951        }
21952    }
21953}
21954#[doc = "id: 12901"]
21955#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
21956#[derive(Debug, Clone, PartialEq)]
21957#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21958#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21959pub struct OPEN_DRONE_ID_LOCATION_DATA {
21960    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21961    pub latitude: i32,
21962    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21963    pub longitude: i32,
21964    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
21965    pub altitude_barometric: f32,
21966    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
21967    pub altitude_geodetic: f32,
21968    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
21969    pub height: f32,
21970    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
21971    pub timestamp: f32,
21972    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
21973    pub direction: u16,
21974    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
21975    pub speed_horizontal: u16,
21976    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
21977    pub speed_vertical: i16,
21978    #[doc = "System ID (0 for broadcast)."]
21979    pub target_system: u8,
21980    #[doc = "Component ID (0 for broadcast)."]
21981    pub target_component: u8,
21982    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21983    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21984    pub id_or_mac: [u8; 20],
21985    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
21986    pub status: MavOdidStatus,
21987    #[doc = "Indicates the reference point for the height field."]
21988    pub height_reference: MavOdidHeightRef,
21989    #[doc = "The accuracy of the horizontal position."]
21990    pub horizontal_accuracy: MavOdidHorAcc,
21991    #[doc = "The accuracy of the vertical position."]
21992    pub vertical_accuracy: MavOdidVerAcc,
21993    #[doc = "The accuracy of the barometric altitude."]
21994    pub barometer_accuracy: MavOdidVerAcc,
21995    #[doc = "The accuracy of the horizontal and vertical speed."]
21996    pub speed_accuracy: MavOdidSpeedAcc,
21997    #[doc = "The accuracy of the timestamps."]
21998    pub timestamp_accuracy: MavOdidTimeAcc,
21999}
22000impl OPEN_DRONE_ID_LOCATION_DATA {
22001    pub const ENCODED_LEN: usize = 59usize;
22002    pub const DEFAULT: Self = Self {
22003        latitude: 0_i32,
22004        longitude: 0_i32,
22005        altitude_barometric: 0.0_f32,
22006        altitude_geodetic: 0.0_f32,
22007        height: 0.0_f32,
22008        timestamp: 0.0_f32,
22009        direction: 0_u16,
22010        speed_horizontal: 0_u16,
22011        speed_vertical: 0_i16,
22012        target_system: 0_u8,
22013        target_component: 0_u8,
22014        id_or_mac: [0_u8; 20usize],
22015        status: MavOdidStatus::DEFAULT,
22016        height_reference: MavOdidHeightRef::DEFAULT,
22017        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22018        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22019        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22020        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22021        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22022    };
22023    #[cfg(feature = "arbitrary")]
22024    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22025        use arbitrary::{Arbitrary, Unstructured};
22026        let mut buf = [0u8; 1024];
22027        rng.fill_bytes(&mut buf);
22028        let mut unstructured = Unstructured::new(&buf);
22029        Self::arbitrary(&mut unstructured).unwrap_or_default()
22030    }
22031}
22032impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22033    fn default() -> Self {
22034        Self::DEFAULT.clone()
22035    }
22036}
22037impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22038    type Message = MavMessage;
22039    const ID: u32 = 12901u32;
22040    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22041    const EXTRA_CRC: u8 = 254u8;
22042    const ENCODED_LEN: usize = 59usize;
22043    fn deser(
22044        _version: MavlinkVersion,
22045        __input: &[u8],
22046    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22047        let avail_len = __input.len();
22048        let mut payload_buf = [0; Self::ENCODED_LEN];
22049        let mut buf = if avail_len < Self::ENCODED_LEN {
22050            payload_buf[0..avail_len].copy_from_slice(__input);
22051            Bytes::new(&payload_buf)
22052        } else {
22053            Bytes::new(__input)
22054        };
22055        let mut __struct = Self::default();
22056        __struct.latitude = buf.get_i32_le();
22057        __struct.longitude = buf.get_i32_le();
22058        __struct.altitude_barometric = buf.get_f32_le();
22059        __struct.altitude_geodetic = buf.get_f32_le();
22060        __struct.height = buf.get_f32_le();
22061        __struct.timestamp = buf.get_f32_le();
22062        __struct.direction = buf.get_u16_le();
22063        __struct.speed_horizontal = buf.get_u16_le();
22064        __struct.speed_vertical = buf.get_i16_le();
22065        __struct.target_system = buf.get_u8();
22066        __struct.target_component = buf.get_u8();
22067        for v in &mut __struct.id_or_mac {
22068            let val = buf.get_u8();
22069            *v = val;
22070        }
22071        let tmp = buf.get_u8();
22072        __struct.status =
22073            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22074                enum_type: "MavOdidStatus",
22075                value: tmp as u32,
22076            })?;
22077        let tmp = buf.get_u8();
22078        __struct.height_reference =
22079            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22080                enum_type: "MavOdidHeightRef",
22081                value: tmp as u32,
22082            })?;
22083        let tmp = buf.get_u8();
22084        __struct.horizontal_accuracy =
22085            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22086                enum_type: "MavOdidHorAcc",
22087                value: tmp as u32,
22088            })?;
22089        let tmp = buf.get_u8();
22090        __struct.vertical_accuracy =
22091            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22092                enum_type: "MavOdidVerAcc",
22093                value: tmp as u32,
22094            })?;
22095        let tmp = buf.get_u8();
22096        __struct.barometer_accuracy =
22097            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22098                enum_type: "MavOdidVerAcc",
22099                value: tmp as u32,
22100            })?;
22101        let tmp = buf.get_u8();
22102        __struct.speed_accuracy =
22103            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22104                enum_type: "MavOdidSpeedAcc",
22105                value: tmp as u32,
22106            })?;
22107        let tmp = buf.get_u8();
22108        __struct.timestamp_accuracy =
22109            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22110                enum_type: "MavOdidTimeAcc",
22111                value: tmp as u32,
22112            })?;
22113        Ok(__struct)
22114    }
22115    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22116        let mut __tmp = BytesMut::new(bytes);
22117        #[allow(clippy::absurd_extreme_comparisons)]
22118        #[allow(unused_comparisons)]
22119        if __tmp.remaining() < Self::ENCODED_LEN {
22120            panic!(
22121                "buffer is too small (need {} bytes, but got {})",
22122                Self::ENCODED_LEN,
22123                __tmp.remaining(),
22124            )
22125        }
22126        __tmp.put_i32_le(self.latitude);
22127        __tmp.put_i32_le(self.longitude);
22128        __tmp.put_f32_le(self.altitude_barometric);
22129        __tmp.put_f32_le(self.altitude_geodetic);
22130        __tmp.put_f32_le(self.height);
22131        __tmp.put_f32_le(self.timestamp);
22132        __tmp.put_u16_le(self.direction);
22133        __tmp.put_u16_le(self.speed_horizontal);
22134        __tmp.put_i16_le(self.speed_vertical);
22135        __tmp.put_u8(self.target_system);
22136        __tmp.put_u8(self.target_component);
22137        for val in &self.id_or_mac {
22138            __tmp.put_u8(*val);
22139        }
22140        __tmp.put_u8(self.status as u8);
22141        __tmp.put_u8(self.height_reference as u8);
22142        __tmp.put_u8(self.horizontal_accuracy as u8);
22143        __tmp.put_u8(self.vertical_accuracy as u8);
22144        __tmp.put_u8(self.barometer_accuracy as u8);
22145        __tmp.put_u8(self.speed_accuracy as u8);
22146        __tmp.put_u8(self.timestamp_accuracy as u8);
22147        if matches!(version, MavlinkVersion::V2) {
22148            let len = __tmp.len();
22149            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22150        } else {
22151            __tmp.len()
22152        }
22153    }
22154}
22155#[doc = "id: 12915"]
22156#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22157#[derive(Debug, Clone, PartialEq)]
22158#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22159#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22160pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22161    #[doc = "System ID (0 for broadcast)."]
22162    pub target_system: u8,
22163    #[doc = "Component ID (0 for broadcast)."]
22164    pub target_component: u8,
22165    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22166    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22167    pub id_or_mac: [u8; 20],
22168    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22169    pub single_message_size: u8,
22170    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22171    pub msg_pack_size: u8,
22172    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22173    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22174    pub messages: [u8; 225],
22175}
22176impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22177    pub const ENCODED_LEN: usize = 249usize;
22178    pub const DEFAULT: Self = Self {
22179        target_system: 0_u8,
22180        target_component: 0_u8,
22181        id_or_mac: [0_u8; 20usize],
22182        single_message_size: 0_u8,
22183        msg_pack_size: 0_u8,
22184        messages: [0_u8; 225usize],
22185    };
22186    #[cfg(feature = "arbitrary")]
22187    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22188        use arbitrary::{Arbitrary, Unstructured};
22189        let mut buf = [0u8; 1024];
22190        rng.fill_bytes(&mut buf);
22191        let mut unstructured = Unstructured::new(&buf);
22192        Self::arbitrary(&mut unstructured).unwrap_or_default()
22193    }
22194}
22195impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22196    fn default() -> Self {
22197        Self::DEFAULT.clone()
22198    }
22199}
22200impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22201    type Message = MavMessage;
22202    const ID: u32 = 12915u32;
22203    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22204    const EXTRA_CRC: u8 = 94u8;
22205    const ENCODED_LEN: usize = 249usize;
22206    fn deser(
22207        _version: MavlinkVersion,
22208        __input: &[u8],
22209    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22210        let avail_len = __input.len();
22211        let mut payload_buf = [0; Self::ENCODED_LEN];
22212        let mut buf = if avail_len < Self::ENCODED_LEN {
22213            payload_buf[0..avail_len].copy_from_slice(__input);
22214            Bytes::new(&payload_buf)
22215        } else {
22216            Bytes::new(__input)
22217        };
22218        let mut __struct = Self::default();
22219        __struct.target_system = buf.get_u8();
22220        __struct.target_component = buf.get_u8();
22221        for v in &mut __struct.id_or_mac {
22222            let val = buf.get_u8();
22223            *v = val;
22224        }
22225        __struct.single_message_size = buf.get_u8();
22226        __struct.msg_pack_size = buf.get_u8();
22227        for v in &mut __struct.messages {
22228            let val = buf.get_u8();
22229            *v = val;
22230        }
22231        Ok(__struct)
22232    }
22233    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22234        let mut __tmp = BytesMut::new(bytes);
22235        #[allow(clippy::absurd_extreme_comparisons)]
22236        #[allow(unused_comparisons)]
22237        if __tmp.remaining() < Self::ENCODED_LEN {
22238            panic!(
22239                "buffer is too small (need {} bytes, but got {})",
22240                Self::ENCODED_LEN,
22241                __tmp.remaining(),
22242            )
22243        }
22244        __tmp.put_u8(self.target_system);
22245        __tmp.put_u8(self.target_component);
22246        for val in &self.id_or_mac {
22247            __tmp.put_u8(*val);
22248        }
22249        __tmp.put_u8(self.single_message_size);
22250        __tmp.put_u8(self.msg_pack_size);
22251        for val in &self.messages {
22252            __tmp.put_u8(*val);
22253        }
22254        if matches!(version, MavlinkVersion::V2) {
22255            let len = __tmp.len();
22256            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22257        } else {
22258            __tmp.len()
22259        }
22260    }
22261}
22262#[doc = "id: 12905"]
22263#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22264#[derive(Debug, Clone, PartialEq)]
22265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22266#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22267pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22268    #[doc = "System ID (0 for broadcast)."]
22269    pub target_system: u8,
22270    #[doc = "Component ID (0 for broadcast)."]
22271    pub target_component: u8,
22272    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22273    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22274    pub id_or_mac: [u8; 20],
22275    #[doc = "Indicates the type of the operator_id field."]
22276    pub operator_id_type: MavOdidOperatorIdType,
22277    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22278    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22279    pub operator_id: [u8; 20],
22280}
22281impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22282    pub const ENCODED_LEN: usize = 43usize;
22283    pub const DEFAULT: Self = Self {
22284        target_system: 0_u8,
22285        target_component: 0_u8,
22286        id_or_mac: [0_u8; 20usize],
22287        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22288        operator_id: [0_u8; 20usize],
22289    };
22290    #[cfg(feature = "arbitrary")]
22291    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22292        use arbitrary::{Arbitrary, Unstructured};
22293        let mut buf = [0u8; 1024];
22294        rng.fill_bytes(&mut buf);
22295        let mut unstructured = Unstructured::new(&buf);
22296        Self::arbitrary(&mut unstructured).unwrap_or_default()
22297    }
22298}
22299impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22300    fn default() -> Self {
22301        Self::DEFAULT.clone()
22302    }
22303}
22304impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22305    type Message = MavMessage;
22306    const ID: u32 = 12905u32;
22307    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22308    const EXTRA_CRC: u8 = 49u8;
22309    const ENCODED_LEN: usize = 43usize;
22310    fn deser(
22311        _version: MavlinkVersion,
22312        __input: &[u8],
22313    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22314        let avail_len = __input.len();
22315        let mut payload_buf = [0; Self::ENCODED_LEN];
22316        let mut buf = if avail_len < Self::ENCODED_LEN {
22317            payload_buf[0..avail_len].copy_from_slice(__input);
22318            Bytes::new(&payload_buf)
22319        } else {
22320            Bytes::new(__input)
22321        };
22322        let mut __struct = Self::default();
22323        __struct.target_system = buf.get_u8();
22324        __struct.target_component = buf.get_u8();
22325        for v in &mut __struct.id_or_mac {
22326            let val = buf.get_u8();
22327            *v = val;
22328        }
22329        let tmp = buf.get_u8();
22330        __struct.operator_id_type =
22331            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22332                enum_type: "MavOdidOperatorIdType",
22333                value: tmp as u32,
22334            })?;
22335        for v in &mut __struct.operator_id {
22336            let val = buf.get_u8();
22337            *v = val;
22338        }
22339        Ok(__struct)
22340    }
22341    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22342        let mut __tmp = BytesMut::new(bytes);
22343        #[allow(clippy::absurd_extreme_comparisons)]
22344        #[allow(unused_comparisons)]
22345        if __tmp.remaining() < Self::ENCODED_LEN {
22346            panic!(
22347                "buffer is too small (need {} bytes, but got {})",
22348                Self::ENCODED_LEN,
22349                __tmp.remaining(),
22350            )
22351        }
22352        __tmp.put_u8(self.target_system);
22353        __tmp.put_u8(self.target_component);
22354        for val in &self.id_or_mac {
22355            __tmp.put_u8(*val);
22356        }
22357        __tmp.put_u8(self.operator_id_type as u8);
22358        for val in &self.operator_id {
22359            __tmp.put_u8(*val);
22360        }
22361        if matches!(version, MavlinkVersion::V2) {
22362            let len = __tmp.len();
22363            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22364        } else {
22365            __tmp.len()
22366        }
22367    }
22368}
22369#[doc = "id: 12903"]
22370#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22371#[derive(Debug, Clone, PartialEq)]
22372#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22373#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22374pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22375    #[doc = "System ID (0 for broadcast)."]
22376    pub target_system: u8,
22377    #[doc = "Component ID (0 for broadcast)."]
22378    pub target_component: u8,
22379    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22380    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22381    pub id_or_mac: [u8; 20],
22382    #[doc = "Indicates the type of the description field."]
22383    pub description_type: MavOdidDescType,
22384    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22385    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22386    pub description: [u8; 23],
22387}
22388impl OPEN_DRONE_ID_SELF_ID_DATA {
22389    pub const ENCODED_LEN: usize = 46usize;
22390    pub const DEFAULT: Self = Self {
22391        target_system: 0_u8,
22392        target_component: 0_u8,
22393        id_or_mac: [0_u8; 20usize],
22394        description_type: MavOdidDescType::DEFAULT,
22395        description: [0_u8; 23usize],
22396    };
22397    #[cfg(feature = "arbitrary")]
22398    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22399        use arbitrary::{Arbitrary, Unstructured};
22400        let mut buf = [0u8; 1024];
22401        rng.fill_bytes(&mut buf);
22402        let mut unstructured = Unstructured::new(&buf);
22403        Self::arbitrary(&mut unstructured).unwrap_or_default()
22404    }
22405}
22406impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22407    fn default() -> Self {
22408        Self::DEFAULT.clone()
22409    }
22410}
22411impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22412    type Message = MavMessage;
22413    const ID: u32 = 12903u32;
22414    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22415    const EXTRA_CRC: u8 = 249u8;
22416    const ENCODED_LEN: usize = 46usize;
22417    fn deser(
22418        _version: MavlinkVersion,
22419        __input: &[u8],
22420    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22421        let avail_len = __input.len();
22422        let mut payload_buf = [0; Self::ENCODED_LEN];
22423        let mut buf = if avail_len < Self::ENCODED_LEN {
22424            payload_buf[0..avail_len].copy_from_slice(__input);
22425            Bytes::new(&payload_buf)
22426        } else {
22427            Bytes::new(__input)
22428        };
22429        let mut __struct = Self::default();
22430        __struct.target_system = buf.get_u8();
22431        __struct.target_component = buf.get_u8();
22432        for v in &mut __struct.id_or_mac {
22433            let val = buf.get_u8();
22434            *v = val;
22435        }
22436        let tmp = buf.get_u8();
22437        __struct.description_type =
22438            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22439                enum_type: "MavOdidDescType",
22440                value: tmp as u32,
22441            })?;
22442        for v in &mut __struct.description {
22443            let val = buf.get_u8();
22444            *v = val;
22445        }
22446        Ok(__struct)
22447    }
22448    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22449        let mut __tmp = BytesMut::new(bytes);
22450        #[allow(clippy::absurd_extreme_comparisons)]
22451        #[allow(unused_comparisons)]
22452        if __tmp.remaining() < Self::ENCODED_LEN {
22453            panic!(
22454                "buffer is too small (need {} bytes, but got {})",
22455                Self::ENCODED_LEN,
22456                __tmp.remaining(),
22457            )
22458        }
22459        __tmp.put_u8(self.target_system);
22460        __tmp.put_u8(self.target_component);
22461        for val in &self.id_or_mac {
22462            __tmp.put_u8(*val);
22463        }
22464        __tmp.put_u8(self.description_type as u8);
22465        for val in &self.description {
22466            __tmp.put_u8(*val);
22467        }
22468        if matches!(version, MavlinkVersion::V2) {
22469            let len = __tmp.len();
22470            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22471        } else {
22472            __tmp.len()
22473        }
22474    }
22475}
22476#[doc = "id: 12904"]
22477#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22478#[derive(Debug, Clone, PartialEq)]
22479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22481pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22482    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22483    pub operator_latitude: i32,
22484    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22485    pub operator_longitude: i32,
22486    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22487    pub area_ceiling: f32,
22488    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22489    pub area_floor: f32,
22490    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22491    pub operator_altitude_geo: f32,
22492    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22493    pub timestamp: u32,
22494    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22495    pub area_count: u16,
22496    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22497    pub area_radius: u16,
22498    #[doc = "System ID (0 for broadcast)."]
22499    pub target_system: u8,
22500    #[doc = "Component ID (0 for broadcast)."]
22501    pub target_component: u8,
22502    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22503    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22504    pub id_or_mac: [u8; 20],
22505    #[doc = "Specifies the operator location type."]
22506    pub operator_location_type: MavOdidOperatorLocationType,
22507    #[doc = "Specifies the classification type of the UA."]
22508    pub classification_type: MavOdidClassificationType,
22509    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22510    pub category_eu: MavOdidCategoryEu,
22511    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22512    pub class_eu: MavOdidClassEu,
22513}
22514impl OPEN_DRONE_ID_SYSTEM_DATA {
22515    pub const ENCODED_LEN: usize = 54usize;
22516    pub const DEFAULT: Self = Self {
22517        operator_latitude: 0_i32,
22518        operator_longitude: 0_i32,
22519        area_ceiling: 0.0_f32,
22520        area_floor: 0.0_f32,
22521        operator_altitude_geo: 0.0_f32,
22522        timestamp: 0_u32,
22523        area_count: 0_u16,
22524        area_radius: 0_u16,
22525        target_system: 0_u8,
22526        target_component: 0_u8,
22527        id_or_mac: [0_u8; 20usize],
22528        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22529        classification_type: MavOdidClassificationType::DEFAULT,
22530        category_eu: MavOdidCategoryEu::DEFAULT,
22531        class_eu: MavOdidClassEu::DEFAULT,
22532    };
22533    #[cfg(feature = "arbitrary")]
22534    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22535        use arbitrary::{Arbitrary, Unstructured};
22536        let mut buf = [0u8; 1024];
22537        rng.fill_bytes(&mut buf);
22538        let mut unstructured = Unstructured::new(&buf);
22539        Self::arbitrary(&mut unstructured).unwrap_or_default()
22540    }
22541}
22542impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22543    fn default() -> Self {
22544        Self::DEFAULT.clone()
22545    }
22546}
22547impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22548    type Message = MavMessage;
22549    const ID: u32 = 12904u32;
22550    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22551    const EXTRA_CRC: u8 = 77u8;
22552    const ENCODED_LEN: usize = 54usize;
22553    fn deser(
22554        _version: MavlinkVersion,
22555        __input: &[u8],
22556    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22557        let avail_len = __input.len();
22558        let mut payload_buf = [0; Self::ENCODED_LEN];
22559        let mut buf = if avail_len < Self::ENCODED_LEN {
22560            payload_buf[0..avail_len].copy_from_slice(__input);
22561            Bytes::new(&payload_buf)
22562        } else {
22563            Bytes::new(__input)
22564        };
22565        let mut __struct = Self::default();
22566        __struct.operator_latitude = buf.get_i32_le();
22567        __struct.operator_longitude = buf.get_i32_le();
22568        __struct.area_ceiling = buf.get_f32_le();
22569        __struct.area_floor = buf.get_f32_le();
22570        __struct.operator_altitude_geo = buf.get_f32_le();
22571        __struct.timestamp = buf.get_u32_le();
22572        __struct.area_count = buf.get_u16_le();
22573        __struct.area_radius = buf.get_u16_le();
22574        __struct.target_system = buf.get_u8();
22575        __struct.target_component = buf.get_u8();
22576        for v in &mut __struct.id_or_mac {
22577            let val = buf.get_u8();
22578            *v = val;
22579        }
22580        let tmp = buf.get_u8();
22581        __struct.operator_location_type =
22582            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22583                enum_type: "MavOdidOperatorLocationType",
22584                value: tmp as u32,
22585            })?;
22586        let tmp = buf.get_u8();
22587        __struct.classification_type =
22588            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22589                enum_type: "MavOdidClassificationType",
22590                value: tmp as u32,
22591            })?;
22592        let tmp = buf.get_u8();
22593        __struct.category_eu =
22594            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22595                enum_type: "MavOdidCategoryEu",
22596                value: tmp as u32,
22597            })?;
22598        let tmp = buf.get_u8();
22599        __struct.class_eu =
22600            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22601                enum_type: "MavOdidClassEu",
22602                value: tmp as u32,
22603            })?;
22604        Ok(__struct)
22605    }
22606    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22607        let mut __tmp = BytesMut::new(bytes);
22608        #[allow(clippy::absurd_extreme_comparisons)]
22609        #[allow(unused_comparisons)]
22610        if __tmp.remaining() < Self::ENCODED_LEN {
22611            panic!(
22612                "buffer is too small (need {} bytes, but got {})",
22613                Self::ENCODED_LEN,
22614                __tmp.remaining(),
22615            )
22616        }
22617        __tmp.put_i32_le(self.operator_latitude);
22618        __tmp.put_i32_le(self.operator_longitude);
22619        __tmp.put_f32_le(self.area_ceiling);
22620        __tmp.put_f32_le(self.area_floor);
22621        __tmp.put_f32_le(self.operator_altitude_geo);
22622        __tmp.put_u32_le(self.timestamp);
22623        __tmp.put_u16_le(self.area_count);
22624        __tmp.put_u16_le(self.area_radius);
22625        __tmp.put_u8(self.target_system);
22626        __tmp.put_u8(self.target_component);
22627        for val in &self.id_or_mac {
22628            __tmp.put_u8(*val);
22629        }
22630        __tmp.put_u8(self.operator_location_type as u8);
22631        __tmp.put_u8(self.classification_type as u8);
22632        __tmp.put_u8(self.category_eu as u8);
22633        __tmp.put_u8(self.class_eu as u8);
22634        if matches!(version, MavlinkVersion::V2) {
22635            let len = __tmp.len();
22636            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22637        } else {
22638            __tmp.len()
22639        }
22640    }
22641}
22642#[doc = "id: 12919"]
22643#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
22644#[derive(Debug, Clone, PartialEq)]
22645#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22647pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22648    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22649    pub operator_latitude: i32,
22650    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22651    pub operator_longitude: i32,
22652    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22653    pub operator_altitude_geo: f32,
22654    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22655    pub timestamp: u32,
22656    #[doc = "System ID (0 for broadcast)."]
22657    pub target_system: u8,
22658    #[doc = "Component ID (0 for broadcast)."]
22659    pub target_component: u8,
22660}
22661impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22662    pub const ENCODED_LEN: usize = 18usize;
22663    pub const DEFAULT: Self = Self {
22664        operator_latitude: 0_i32,
22665        operator_longitude: 0_i32,
22666        operator_altitude_geo: 0.0_f32,
22667        timestamp: 0_u32,
22668        target_system: 0_u8,
22669        target_component: 0_u8,
22670    };
22671    #[cfg(feature = "arbitrary")]
22672    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22673        use arbitrary::{Arbitrary, Unstructured};
22674        let mut buf = [0u8; 1024];
22675        rng.fill_bytes(&mut buf);
22676        let mut unstructured = Unstructured::new(&buf);
22677        Self::arbitrary(&mut unstructured).unwrap_or_default()
22678    }
22679}
22680impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22681    fn default() -> Self {
22682        Self::DEFAULT.clone()
22683    }
22684}
22685impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22686    type Message = MavMessage;
22687    const ID: u32 = 12919u32;
22688    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
22689    const EXTRA_CRC: u8 = 7u8;
22690    const ENCODED_LEN: usize = 18usize;
22691    fn deser(
22692        _version: MavlinkVersion,
22693        __input: &[u8],
22694    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22695        let avail_len = __input.len();
22696        let mut payload_buf = [0; Self::ENCODED_LEN];
22697        let mut buf = if avail_len < Self::ENCODED_LEN {
22698            payload_buf[0..avail_len].copy_from_slice(__input);
22699            Bytes::new(&payload_buf)
22700        } else {
22701            Bytes::new(__input)
22702        };
22703        let mut __struct = Self::default();
22704        __struct.operator_latitude = buf.get_i32_le();
22705        __struct.operator_longitude = buf.get_i32_le();
22706        __struct.operator_altitude_geo = buf.get_f32_le();
22707        __struct.timestamp = buf.get_u32_le();
22708        __struct.target_system = buf.get_u8();
22709        __struct.target_component = buf.get_u8();
22710        Ok(__struct)
22711    }
22712    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22713        let mut __tmp = BytesMut::new(bytes);
22714        #[allow(clippy::absurd_extreme_comparisons)]
22715        #[allow(unused_comparisons)]
22716        if __tmp.remaining() < Self::ENCODED_LEN {
22717            panic!(
22718                "buffer is too small (need {} bytes, but got {})",
22719                Self::ENCODED_LEN,
22720                __tmp.remaining(),
22721            )
22722        }
22723        __tmp.put_i32_le(self.operator_latitude);
22724        __tmp.put_i32_le(self.operator_longitude);
22725        __tmp.put_f32_le(self.operator_altitude_geo);
22726        __tmp.put_u32_le(self.timestamp);
22727        __tmp.put_u8(self.target_system);
22728        __tmp.put_u8(self.target_component);
22729        if matches!(version, MavlinkVersion::V2) {
22730            let len = __tmp.len();
22731            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22732        } else {
22733            __tmp.len()
22734        }
22735    }
22736}
22737#[doc = "id: 100"]
22738#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
22739#[derive(Debug, Clone, PartialEq)]
22740#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22741#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22742pub struct OPTICAL_FLOW_DATA {
22743    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22744    pub time_usec: u64,
22745    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
22746    pub flow_comp_m_x: f32,
22747    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
22748    pub flow_comp_m_y: f32,
22749    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
22750    pub ground_distance: f32,
22751    #[doc = "Flow in x-sensor direction"]
22752    pub flow_x: i16,
22753    #[doc = "Flow in y-sensor direction"]
22754    pub flow_y: i16,
22755    #[doc = "Sensor ID"]
22756    pub sensor_id: u8,
22757    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
22758    pub quality: u8,
22759    #[doc = "Flow rate about X axis"]
22760    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22761    pub flow_rate_x: f32,
22762    #[doc = "Flow rate about Y axis"]
22763    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22764    pub flow_rate_y: f32,
22765}
22766impl OPTICAL_FLOW_DATA {
22767    pub const ENCODED_LEN: usize = 34usize;
22768    pub const DEFAULT: Self = Self {
22769        time_usec: 0_u64,
22770        flow_comp_m_x: 0.0_f32,
22771        flow_comp_m_y: 0.0_f32,
22772        ground_distance: 0.0_f32,
22773        flow_x: 0_i16,
22774        flow_y: 0_i16,
22775        sensor_id: 0_u8,
22776        quality: 0_u8,
22777        flow_rate_x: 0.0_f32,
22778        flow_rate_y: 0.0_f32,
22779    };
22780    #[cfg(feature = "arbitrary")]
22781    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22782        use arbitrary::{Arbitrary, Unstructured};
22783        let mut buf = [0u8; 1024];
22784        rng.fill_bytes(&mut buf);
22785        let mut unstructured = Unstructured::new(&buf);
22786        Self::arbitrary(&mut unstructured).unwrap_or_default()
22787    }
22788}
22789impl Default for OPTICAL_FLOW_DATA {
22790    fn default() -> Self {
22791        Self::DEFAULT.clone()
22792    }
22793}
22794impl MessageData for OPTICAL_FLOW_DATA {
22795    type Message = MavMessage;
22796    const ID: u32 = 100u32;
22797    const NAME: &'static str = "OPTICAL_FLOW";
22798    const EXTRA_CRC: u8 = 175u8;
22799    const ENCODED_LEN: usize = 34usize;
22800    fn deser(
22801        _version: MavlinkVersion,
22802        __input: &[u8],
22803    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22804        let avail_len = __input.len();
22805        let mut payload_buf = [0; Self::ENCODED_LEN];
22806        let mut buf = if avail_len < Self::ENCODED_LEN {
22807            payload_buf[0..avail_len].copy_from_slice(__input);
22808            Bytes::new(&payload_buf)
22809        } else {
22810            Bytes::new(__input)
22811        };
22812        let mut __struct = Self::default();
22813        __struct.time_usec = buf.get_u64_le();
22814        __struct.flow_comp_m_x = buf.get_f32_le();
22815        __struct.flow_comp_m_y = buf.get_f32_le();
22816        __struct.ground_distance = buf.get_f32_le();
22817        __struct.flow_x = buf.get_i16_le();
22818        __struct.flow_y = buf.get_i16_le();
22819        __struct.sensor_id = buf.get_u8();
22820        __struct.quality = buf.get_u8();
22821        __struct.flow_rate_x = buf.get_f32_le();
22822        __struct.flow_rate_y = buf.get_f32_le();
22823        Ok(__struct)
22824    }
22825    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22826        let mut __tmp = BytesMut::new(bytes);
22827        #[allow(clippy::absurd_extreme_comparisons)]
22828        #[allow(unused_comparisons)]
22829        if __tmp.remaining() < Self::ENCODED_LEN {
22830            panic!(
22831                "buffer is too small (need {} bytes, but got {})",
22832                Self::ENCODED_LEN,
22833                __tmp.remaining(),
22834            )
22835        }
22836        __tmp.put_u64_le(self.time_usec);
22837        __tmp.put_f32_le(self.flow_comp_m_x);
22838        __tmp.put_f32_le(self.flow_comp_m_y);
22839        __tmp.put_f32_le(self.ground_distance);
22840        __tmp.put_i16_le(self.flow_x);
22841        __tmp.put_i16_le(self.flow_y);
22842        __tmp.put_u8(self.sensor_id);
22843        __tmp.put_u8(self.quality);
22844        __tmp.put_f32_le(self.flow_rate_x);
22845        __tmp.put_f32_le(self.flow_rate_y);
22846        if matches!(version, MavlinkVersion::V2) {
22847            let len = __tmp.len();
22848            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22849        } else {
22850            __tmp.len()
22851        }
22852    }
22853}
22854#[doc = "id: 106"]
22855#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
22856#[derive(Debug, Clone, PartialEq)]
22857#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22859pub struct OPTICAL_FLOW_RAD_DATA {
22860    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22861    pub time_usec: u64,
22862    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22863    pub integration_time_us: u32,
22864    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22865    pub integrated_x: f32,
22866    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22867    pub integrated_y: f32,
22868    #[doc = "RH rotation around X axis"]
22869    pub integrated_xgyro: f32,
22870    #[doc = "RH rotation around Y axis"]
22871    pub integrated_ygyro: f32,
22872    #[doc = "RH rotation around Z axis"]
22873    pub integrated_zgyro: f32,
22874    #[doc = "Time since the distance was sampled."]
22875    pub time_delta_distance_us: u32,
22876    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22877    pub distance: f32,
22878    #[doc = "Temperature"]
22879    pub temperature: i16,
22880    #[doc = "Sensor ID"]
22881    pub sensor_id: u8,
22882    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22883    pub quality: u8,
22884}
22885impl OPTICAL_FLOW_RAD_DATA {
22886    pub const ENCODED_LEN: usize = 44usize;
22887    pub const DEFAULT: Self = Self {
22888        time_usec: 0_u64,
22889        integration_time_us: 0_u32,
22890        integrated_x: 0.0_f32,
22891        integrated_y: 0.0_f32,
22892        integrated_xgyro: 0.0_f32,
22893        integrated_ygyro: 0.0_f32,
22894        integrated_zgyro: 0.0_f32,
22895        time_delta_distance_us: 0_u32,
22896        distance: 0.0_f32,
22897        temperature: 0_i16,
22898        sensor_id: 0_u8,
22899        quality: 0_u8,
22900    };
22901    #[cfg(feature = "arbitrary")]
22902    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22903        use arbitrary::{Arbitrary, Unstructured};
22904        let mut buf = [0u8; 1024];
22905        rng.fill_bytes(&mut buf);
22906        let mut unstructured = Unstructured::new(&buf);
22907        Self::arbitrary(&mut unstructured).unwrap_or_default()
22908    }
22909}
22910impl Default for OPTICAL_FLOW_RAD_DATA {
22911    fn default() -> Self {
22912        Self::DEFAULT.clone()
22913    }
22914}
22915impl MessageData for OPTICAL_FLOW_RAD_DATA {
22916    type Message = MavMessage;
22917    const ID: u32 = 106u32;
22918    const NAME: &'static str = "OPTICAL_FLOW_RAD";
22919    const EXTRA_CRC: u8 = 138u8;
22920    const ENCODED_LEN: usize = 44usize;
22921    fn deser(
22922        _version: MavlinkVersion,
22923        __input: &[u8],
22924    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22925        let avail_len = __input.len();
22926        let mut payload_buf = [0; Self::ENCODED_LEN];
22927        let mut buf = if avail_len < Self::ENCODED_LEN {
22928            payload_buf[0..avail_len].copy_from_slice(__input);
22929            Bytes::new(&payload_buf)
22930        } else {
22931            Bytes::new(__input)
22932        };
22933        let mut __struct = Self::default();
22934        __struct.time_usec = buf.get_u64_le();
22935        __struct.integration_time_us = buf.get_u32_le();
22936        __struct.integrated_x = buf.get_f32_le();
22937        __struct.integrated_y = buf.get_f32_le();
22938        __struct.integrated_xgyro = buf.get_f32_le();
22939        __struct.integrated_ygyro = buf.get_f32_le();
22940        __struct.integrated_zgyro = buf.get_f32_le();
22941        __struct.time_delta_distance_us = buf.get_u32_le();
22942        __struct.distance = buf.get_f32_le();
22943        __struct.temperature = buf.get_i16_le();
22944        __struct.sensor_id = buf.get_u8();
22945        __struct.quality = buf.get_u8();
22946        Ok(__struct)
22947    }
22948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22949        let mut __tmp = BytesMut::new(bytes);
22950        #[allow(clippy::absurd_extreme_comparisons)]
22951        #[allow(unused_comparisons)]
22952        if __tmp.remaining() < Self::ENCODED_LEN {
22953            panic!(
22954                "buffer is too small (need {} bytes, but got {})",
22955                Self::ENCODED_LEN,
22956                __tmp.remaining(),
22957            )
22958        }
22959        __tmp.put_u64_le(self.time_usec);
22960        __tmp.put_u32_le(self.integration_time_us);
22961        __tmp.put_f32_le(self.integrated_x);
22962        __tmp.put_f32_le(self.integrated_y);
22963        __tmp.put_f32_le(self.integrated_xgyro);
22964        __tmp.put_f32_le(self.integrated_ygyro);
22965        __tmp.put_f32_le(self.integrated_zgyro);
22966        __tmp.put_u32_le(self.time_delta_distance_us);
22967        __tmp.put_f32_le(self.distance);
22968        __tmp.put_i16_le(self.temperature);
22969        __tmp.put_u8(self.sensor_id);
22970        __tmp.put_u8(self.quality);
22971        if matches!(version, MavlinkVersion::V2) {
22972            let len = __tmp.len();
22973            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22974        } else {
22975            __tmp.len()
22976        }
22977    }
22978}
22979#[doc = "id: 360"]
22980#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
22981#[derive(Debug, Clone, PartialEq)]
22982#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22984pub struct ORBIT_EXECUTION_STATUS_DATA {
22985    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22986    pub time_usec: u64,
22987    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
22988    pub radius: f32,
22989    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22990    pub x: i32,
22991    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22992    pub y: i32,
22993    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
22994    pub z: f32,
22995    #[doc = "The coordinate system of the fields: x, y, z."]
22996    pub frame: MavFrame,
22997}
22998impl ORBIT_EXECUTION_STATUS_DATA {
22999    pub const ENCODED_LEN: usize = 25usize;
23000    pub const DEFAULT: Self = Self {
23001        time_usec: 0_u64,
23002        radius: 0.0_f32,
23003        x: 0_i32,
23004        y: 0_i32,
23005        z: 0.0_f32,
23006        frame: MavFrame::DEFAULT,
23007    };
23008    #[cfg(feature = "arbitrary")]
23009    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23010        use arbitrary::{Arbitrary, Unstructured};
23011        let mut buf = [0u8; 1024];
23012        rng.fill_bytes(&mut buf);
23013        let mut unstructured = Unstructured::new(&buf);
23014        Self::arbitrary(&mut unstructured).unwrap_or_default()
23015    }
23016}
23017impl Default for ORBIT_EXECUTION_STATUS_DATA {
23018    fn default() -> Self {
23019        Self::DEFAULT.clone()
23020    }
23021}
23022impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23023    type Message = MavMessage;
23024    const ID: u32 = 360u32;
23025    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23026    const EXTRA_CRC: u8 = 11u8;
23027    const ENCODED_LEN: usize = 25usize;
23028    fn deser(
23029        _version: MavlinkVersion,
23030        __input: &[u8],
23031    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23032        let avail_len = __input.len();
23033        let mut payload_buf = [0; Self::ENCODED_LEN];
23034        let mut buf = if avail_len < Self::ENCODED_LEN {
23035            payload_buf[0..avail_len].copy_from_slice(__input);
23036            Bytes::new(&payload_buf)
23037        } else {
23038            Bytes::new(__input)
23039        };
23040        let mut __struct = Self::default();
23041        __struct.time_usec = buf.get_u64_le();
23042        __struct.radius = buf.get_f32_le();
23043        __struct.x = buf.get_i32_le();
23044        __struct.y = buf.get_i32_le();
23045        __struct.z = buf.get_f32_le();
23046        let tmp = buf.get_u8();
23047        __struct.frame =
23048            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23049                enum_type: "MavFrame",
23050                value: tmp as u32,
23051            })?;
23052        Ok(__struct)
23053    }
23054    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23055        let mut __tmp = BytesMut::new(bytes);
23056        #[allow(clippy::absurd_extreme_comparisons)]
23057        #[allow(unused_comparisons)]
23058        if __tmp.remaining() < Self::ENCODED_LEN {
23059            panic!(
23060                "buffer is too small (need {} bytes, but got {})",
23061                Self::ENCODED_LEN,
23062                __tmp.remaining(),
23063            )
23064        }
23065        __tmp.put_u64_le(self.time_usec);
23066        __tmp.put_f32_le(self.radius);
23067        __tmp.put_i32_le(self.x);
23068        __tmp.put_i32_le(self.y);
23069        __tmp.put_f32_le(self.z);
23070        __tmp.put_u8(self.frame as u8);
23071        if matches!(version, MavlinkVersion::V2) {
23072            let len = __tmp.len();
23073            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23074        } else {
23075            __tmp.len()
23076        }
23077    }
23078}
23079#[doc = "id: 324"]
23080#[doc = "Response from a PARAM_EXT_SET message."]
23081#[derive(Debug, Clone, PartialEq)]
23082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23083#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23084pub struct PARAM_EXT_ACK_DATA {
23085    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23086    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23087    pub param_id: [u8; 16],
23088    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23089    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23090    pub param_value: [u8; 128],
23091    #[doc = "Parameter type."]
23092    pub param_type: MavParamExtType,
23093    #[doc = "Result code."]
23094    pub param_result: ParamAck,
23095}
23096impl PARAM_EXT_ACK_DATA {
23097    pub const ENCODED_LEN: usize = 146usize;
23098    pub const DEFAULT: Self = Self {
23099        param_id: [0_u8; 16usize],
23100        param_value: [0_u8; 128usize],
23101        param_type: MavParamExtType::DEFAULT,
23102        param_result: ParamAck::DEFAULT,
23103    };
23104    #[cfg(feature = "arbitrary")]
23105    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23106        use arbitrary::{Arbitrary, Unstructured};
23107        let mut buf = [0u8; 1024];
23108        rng.fill_bytes(&mut buf);
23109        let mut unstructured = Unstructured::new(&buf);
23110        Self::arbitrary(&mut unstructured).unwrap_or_default()
23111    }
23112}
23113impl Default for PARAM_EXT_ACK_DATA {
23114    fn default() -> Self {
23115        Self::DEFAULT.clone()
23116    }
23117}
23118impl MessageData for PARAM_EXT_ACK_DATA {
23119    type Message = MavMessage;
23120    const ID: u32 = 324u32;
23121    const NAME: &'static str = "PARAM_EXT_ACK";
23122    const EXTRA_CRC: u8 = 132u8;
23123    const ENCODED_LEN: usize = 146usize;
23124    fn deser(
23125        _version: MavlinkVersion,
23126        __input: &[u8],
23127    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23128        let avail_len = __input.len();
23129        let mut payload_buf = [0; Self::ENCODED_LEN];
23130        let mut buf = if avail_len < Self::ENCODED_LEN {
23131            payload_buf[0..avail_len].copy_from_slice(__input);
23132            Bytes::new(&payload_buf)
23133        } else {
23134            Bytes::new(__input)
23135        };
23136        let mut __struct = Self::default();
23137        for v in &mut __struct.param_id {
23138            let val = buf.get_u8();
23139            *v = val;
23140        }
23141        for v in &mut __struct.param_value {
23142            let val = buf.get_u8();
23143            *v = val;
23144        }
23145        let tmp = buf.get_u8();
23146        __struct.param_type =
23147            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23148                enum_type: "MavParamExtType",
23149                value: tmp as u32,
23150            })?;
23151        let tmp = buf.get_u8();
23152        __struct.param_result =
23153            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23154                enum_type: "ParamAck",
23155                value: tmp as u32,
23156            })?;
23157        Ok(__struct)
23158    }
23159    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23160        let mut __tmp = BytesMut::new(bytes);
23161        #[allow(clippy::absurd_extreme_comparisons)]
23162        #[allow(unused_comparisons)]
23163        if __tmp.remaining() < Self::ENCODED_LEN {
23164            panic!(
23165                "buffer is too small (need {} bytes, but got {})",
23166                Self::ENCODED_LEN,
23167                __tmp.remaining(),
23168            )
23169        }
23170        for val in &self.param_id {
23171            __tmp.put_u8(*val);
23172        }
23173        for val in &self.param_value {
23174            __tmp.put_u8(*val);
23175        }
23176        __tmp.put_u8(self.param_type as u8);
23177        __tmp.put_u8(self.param_result as u8);
23178        if matches!(version, MavlinkVersion::V2) {
23179            let len = __tmp.len();
23180            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23181        } else {
23182            __tmp.len()
23183        }
23184    }
23185}
23186#[doc = "id: 321"]
23187#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23188#[derive(Debug, Clone, PartialEq)]
23189#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23190#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23191pub struct PARAM_EXT_REQUEST_LIST_DATA {
23192    #[doc = "System ID"]
23193    pub target_system: u8,
23194    #[doc = "Component ID"]
23195    pub target_component: u8,
23196}
23197impl PARAM_EXT_REQUEST_LIST_DATA {
23198    pub const ENCODED_LEN: usize = 2usize;
23199    pub const DEFAULT: Self = Self {
23200        target_system: 0_u8,
23201        target_component: 0_u8,
23202    };
23203    #[cfg(feature = "arbitrary")]
23204    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23205        use arbitrary::{Arbitrary, Unstructured};
23206        let mut buf = [0u8; 1024];
23207        rng.fill_bytes(&mut buf);
23208        let mut unstructured = Unstructured::new(&buf);
23209        Self::arbitrary(&mut unstructured).unwrap_or_default()
23210    }
23211}
23212impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23213    fn default() -> Self {
23214        Self::DEFAULT.clone()
23215    }
23216}
23217impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23218    type Message = MavMessage;
23219    const ID: u32 = 321u32;
23220    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23221    const EXTRA_CRC: u8 = 88u8;
23222    const ENCODED_LEN: usize = 2usize;
23223    fn deser(
23224        _version: MavlinkVersion,
23225        __input: &[u8],
23226    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23227        let avail_len = __input.len();
23228        let mut payload_buf = [0; Self::ENCODED_LEN];
23229        let mut buf = if avail_len < Self::ENCODED_LEN {
23230            payload_buf[0..avail_len].copy_from_slice(__input);
23231            Bytes::new(&payload_buf)
23232        } else {
23233            Bytes::new(__input)
23234        };
23235        let mut __struct = Self::default();
23236        __struct.target_system = buf.get_u8();
23237        __struct.target_component = buf.get_u8();
23238        Ok(__struct)
23239    }
23240    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23241        let mut __tmp = BytesMut::new(bytes);
23242        #[allow(clippy::absurd_extreme_comparisons)]
23243        #[allow(unused_comparisons)]
23244        if __tmp.remaining() < Self::ENCODED_LEN {
23245            panic!(
23246                "buffer is too small (need {} bytes, but got {})",
23247                Self::ENCODED_LEN,
23248                __tmp.remaining(),
23249            )
23250        }
23251        __tmp.put_u8(self.target_system);
23252        __tmp.put_u8(self.target_component);
23253        if matches!(version, MavlinkVersion::V2) {
23254            let len = __tmp.len();
23255            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23256        } else {
23257            __tmp.len()
23258        }
23259    }
23260}
23261#[doc = "id: 320"]
23262#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23263#[derive(Debug, Clone, PartialEq)]
23264#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23265#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23266pub struct PARAM_EXT_REQUEST_READ_DATA {
23267    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23268    pub param_index: i16,
23269    #[doc = "System ID"]
23270    pub target_system: u8,
23271    #[doc = "Component ID"]
23272    pub target_component: u8,
23273    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23274    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23275    pub param_id: [u8; 16],
23276}
23277impl PARAM_EXT_REQUEST_READ_DATA {
23278    pub const ENCODED_LEN: usize = 20usize;
23279    pub const DEFAULT: Self = Self {
23280        param_index: 0_i16,
23281        target_system: 0_u8,
23282        target_component: 0_u8,
23283        param_id: [0_u8; 16usize],
23284    };
23285    #[cfg(feature = "arbitrary")]
23286    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23287        use arbitrary::{Arbitrary, Unstructured};
23288        let mut buf = [0u8; 1024];
23289        rng.fill_bytes(&mut buf);
23290        let mut unstructured = Unstructured::new(&buf);
23291        Self::arbitrary(&mut unstructured).unwrap_or_default()
23292    }
23293}
23294impl Default for PARAM_EXT_REQUEST_READ_DATA {
23295    fn default() -> Self {
23296        Self::DEFAULT.clone()
23297    }
23298}
23299impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23300    type Message = MavMessage;
23301    const ID: u32 = 320u32;
23302    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23303    const EXTRA_CRC: u8 = 243u8;
23304    const ENCODED_LEN: usize = 20usize;
23305    fn deser(
23306        _version: MavlinkVersion,
23307        __input: &[u8],
23308    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23309        let avail_len = __input.len();
23310        let mut payload_buf = [0; Self::ENCODED_LEN];
23311        let mut buf = if avail_len < Self::ENCODED_LEN {
23312            payload_buf[0..avail_len].copy_from_slice(__input);
23313            Bytes::new(&payload_buf)
23314        } else {
23315            Bytes::new(__input)
23316        };
23317        let mut __struct = Self::default();
23318        __struct.param_index = buf.get_i16_le();
23319        __struct.target_system = buf.get_u8();
23320        __struct.target_component = buf.get_u8();
23321        for v in &mut __struct.param_id {
23322            let val = buf.get_u8();
23323            *v = val;
23324        }
23325        Ok(__struct)
23326    }
23327    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23328        let mut __tmp = BytesMut::new(bytes);
23329        #[allow(clippy::absurd_extreme_comparisons)]
23330        #[allow(unused_comparisons)]
23331        if __tmp.remaining() < Self::ENCODED_LEN {
23332            panic!(
23333                "buffer is too small (need {} bytes, but got {})",
23334                Self::ENCODED_LEN,
23335                __tmp.remaining(),
23336            )
23337        }
23338        __tmp.put_i16_le(self.param_index);
23339        __tmp.put_u8(self.target_system);
23340        __tmp.put_u8(self.target_component);
23341        for val in &self.param_id {
23342            __tmp.put_u8(*val);
23343        }
23344        if matches!(version, MavlinkVersion::V2) {
23345            let len = __tmp.len();
23346            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23347        } else {
23348            __tmp.len()
23349        }
23350    }
23351}
23352#[doc = "id: 323"]
23353#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23354#[derive(Debug, Clone, PartialEq)]
23355#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23356#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23357pub struct PARAM_EXT_SET_DATA {
23358    #[doc = "System ID"]
23359    pub target_system: u8,
23360    #[doc = "Component ID"]
23361    pub target_component: u8,
23362    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23363    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23364    pub param_id: [u8; 16],
23365    #[doc = "Parameter value"]
23366    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23367    pub param_value: [u8; 128],
23368    #[doc = "Parameter type."]
23369    pub param_type: MavParamExtType,
23370}
23371impl PARAM_EXT_SET_DATA {
23372    pub const ENCODED_LEN: usize = 147usize;
23373    pub const DEFAULT: Self = Self {
23374        target_system: 0_u8,
23375        target_component: 0_u8,
23376        param_id: [0_u8; 16usize],
23377        param_value: [0_u8; 128usize],
23378        param_type: MavParamExtType::DEFAULT,
23379    };
23380    #[cfg(feature = "arbitrary")]
23381    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23382        use arbitrary::{Arbitrary, Unstructured};
23383        let mut buf = [0u8; 1024];
23384        rng.fill_bytes(&mut buf);
23385        let mut unstructured = Unstructured::new(&buf);
23386        Self::arbitrary(&mut unstructured).unwrap_or_default()
23387    }
23388}
23389impl Default for PARAM_EXT_SET_DATA {
23390    fn default() -> Self {
23391        Self::DEFAULT.clone()
23392    }
23393}
23394impl MessageData for PARAM_EXT_SET_DATA {
23395    type Message = MavMessage;
23396    const ID: u32 = 323u32;
23397    const NAME: &'static str = "PARAM_EXT_SET";
23398    const EXTRA_CRC: u8 = 78u8;
23399    const ENCODED_LEN: usize = 147usize;
23400    fn deser(
23401        _version: MavlinkVersion,
23402        __input: &[u8],
23403    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23404        let avail_len = __input.len();
23405        let mut payload_buf = [0; Self::ENCODED_LEN];
23406        let mut buf = if avail_len < Self::ENCODED_LEN {
23407            payload_buf[0..avail_len].copy_from_slice(__input);
23408            Bytes::new(&payload_buf)
23409        } else {
23410            Bytes::new(__input)
23411        };
23412        let mut __struct = Self::default();
23413        __struct.target_system = buf.get_u8();
23414        __struct.target_component = buf.get_u8();
23415        for v in &mut __struct.param_id {
23416            let val = buf.get_u8();
23417            *v = val;
23418        }
23419        for v in &mut __struct.param_value {
23420            let val = buf.get_u8();
23421            *v = val;
23422        }
23423        let tmp = buf.get_u8();
23424        __struct.param_type =
23425            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23426                enum_type: "MavParamExtType",
23427                value: tmp as u32,
23428            })?;
23429        Ok(__struct)
23430    }
23431    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23432        let mut __tmp = BytesMut::new(bytes);
23433        #[allow(clippy::absurd_extreme_comparisons)]
23434        #[allow(unused_comparisons)]
23435        if __tmp.remaining() < Self::ENCODED_LEN {
23436            panic!(
23437                "buffer is too small (need {} bytes, but got {})",
23438                Self::ENCODED_LEN,
23439                __tmp.remaining(),
23440            )
23441        }
23442        __tmp.put_u8(self.target_system);
23443        __tmp.put_u8(self.target_component);
23444        for val in &self.param_id {
23445            __tmp.put_u8(*val);
23446        }
23447        for val in &self.param_value {
23448            __tmp.put_u8(*val);
23449        }
23450        __tmp.put_u8(self.param_type as u8);
23451        if matches!(version, MavlinkVersion::V2) {
23452            let len = __tmp.len();
23453            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23454        } else {
23455            __tmp.len()
23456        }
23457    }
23458}
23459#[doc = "id: 322"]
23460#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23461#[derive(Debug, Clone, PartialEq)]
23462#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23464pub struct PARAM_EXT_VALUE_DATA {
23465    #[doc = "Total number of parameters"]
23466    pub param_count: u16,
23467    #[doc = "Index of this parameter"]
23468    pub param_index: u16,
23469    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23470    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23471    pub param_id: [u8; 16],
23472    #[doc = "Parameter value"]
23473    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23474    pub param_value: [u8; 128],
23475    #[doc = "Parameter type."]
23476    pub param_type: MavParamExtType,
23477}
23478impl PARAM_EXT_VALUE_DATA {
23479    pub const ENCODED_LEN: usize = 149usize;
23480    pub const DEFAULT: Self = Self {
23481        param_count: 0_u16,
23482        param_index: 0_u16,
23483        param_id: [0_u8; 16usize],
23484        param_value: [0_u8; 128usize],
23485        param_type: MavParamExtType::DEFAULT,
23486    };
23487    #[cfg(feature = "arbitrary")]
23488    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23489        use arbitrary::{Arbitrary, Unstructured};
23490        let mut buf = [0u8; 1024];
23491        rng.fill_bytes(&mut buf);
23492        let mut unstructured = Unstructured::new(&buf);
23493        Self::arbitrary(&mut unstructured).unwrap_or_default()
23494    }
23495}
23496impl Default for PARAM_EXT_VALUE_DATA {
23497    fn default() -> Self {
23498        Self::DEFAULT.clone()
23499    }
23500}
23501impl MessageData for PARAM_EXT_VALUE_DATA {
23502    type Message = MavMessage;
23503    const ID: u32 = 322u32;
23504    const NAME: &'static str = "PARAM_EXT_VALUE";
23505    const EXTRA_CRC: u8 = 243u8;
23506    const ENCODED_LEN: usize = 149usize;
23507    fn deser(
23508        _version: MavlinkVersion,
23509        __input: &[u8],
23510    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23511        let avail_len = __input.len();
23512        let mut payload_buf = [0; Self::ENCODED_LEN];
23513        let mut buf = if avail_len < Self::ENCODED_LEN {
23514            payload_buf[0..avail_len].copy_from_slice(__input);
23515            Bytes::new(&payload_buf)
23516        } else {
23517            Bytes::new(__input)
23518        };
23519        let mut __struct = Self::default();
23520        __struct.param_count = buf.get_u16_le();
23521        __struct.param_index = buf.get_u16_le();
23522        for v in &mut __struct.param_id {
23523            let val = buf.get_u8();
23524            *v = val;
23525        }
23526        for v in &mut __struct.param_value {
23527            let val = buf.get_u8();
23528            *v = val;
23529        }
23530        let tmp = buf.get_u8();
23531        __struct.param_type =
23532            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23533                enum_type: "MavParamExtType",
23534                value: tmp as u32,
23535            })?;
23536        Ok(__struct)
23537    }
23538    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23539        let mut __tmp = BytesMut::new(bytes);
23540        #[allow(clippy::absurd_extreme_comparisons)]
23541        #[allow(unused_comparisons)]
23542        if __tmp.remaining() < Self::ENCODED_LEN {
23543            panic!(
23544                "buffer is too small (need {} bytes, but got {})",
23545                Self::ENCODED_LEN,
23546                __tmp.remaining(),
23547            )
23548        }
23549        __tmp.put_u16_le(self.param_count);
23550        __tmp.put_u16_le(self.param_index);
23551        for val in &self.param_id {
23552            __tmp.put_u8(*val);
23553        }
23554        for val in &self.param_value {
23555            __tmp.put_u8(*val);
23556        }
23557        __tmp.put_u8(self.param_type as u8);
23558        if matches!(version, MavlinkVersion::V2) {
23559            let len = __tmp.len();
23560            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23561        } else {
23562            __tmp.len()
23563        }
23564    }
23565}
23566#[doc = "id: 50"]
23567#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23568#[derive(Debug, Clone, PartialEq)]
23569#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23570#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23571pub struct PARAM_MAP_RC_DATA {
23572    #[doc = "Initial parameter value"]
23573    pub param_value0: f32,
23574    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23575    pub scale: f32,
23576    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23577    pub param_value_min: f32,
23578    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23579    pub param_value_max: f32,
23580    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23581    pub param_index: i16,
23582    #[doc = "System ID"]
23583    pub target_system: u8,
23584    #[doc = "Component ID"]
23585    pub target_component: u8,
23586    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23587    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23588    pub param_id: [u8; 16],
23589    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
23590    pub parameter_rc_channel_index: u8,
23591}
23592impl PARAM_MAP_RC_DATA {
23593    pub const ENCODED_LEN: usize = 37usize;
23594    pub const DEFAULT: Self = Self {
23595        param_value0: 0.0_f32,
23596        scale: 0.0_f32,
23597        param_value_min: 0.0_f32,
23598        param_value_max: 0.0_f32,
23599        param_index: 0_i16,
23600        target_system: 0_u8,
23601        target_component: 0_u8,
23602        param_id: [0_u8; 16usize],
23603        parameter_rc_channel_index: 0_u8,
23604    };
23605    #[cfg(feature = "arbitrary")]
23606    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23607        use arbitrary::{Arbitrary, Unstructured};
23608        let mut buf = [0u8; 1024];
23609        rng.fill_bytes(&mut buf);
23610        let mut unstructured = Unstructured::new(&buf);
23611        Self::arbitrary(&mut unstructured).unwrap_or_default()
23612    }
23613}
23614impl Default for PARAM_MAP_RC_DATA {
23615    fn default() -> Self {
23616        Self::DEFAULT.clone()
23617    }
23618}
23619impl MessageData for PARAM_MAP_RC_DATA {
23620    type Message = MavMessage;
23621    const ID: u32 = 50u32;
23622    const NAME: &'static str = "PARAM_MAP_RC";
23623    const EXTRA_CRC: u8 = 78u8;
23624    const ENCODED_LEN: usize = 37usize;
23625    fn deser(
23626        _version: MavlinkVersion,
23627        __input: &[u8],
23628    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23629        let avail_len = __input.len();
23630        let mut payload_buf = [0; Self::ENCODED_LEN];
23631        let mut buf = if avail_len < Self::ENCODED_LEN {
23632            payload_buf[0..avail_len].copy_from_slice(__input);
23633            Bytes::new(&payload_buf)
23634        } else {
23635            Bytes::new(__input)
23636        };
23637        let mut __struct = Self::default();
23638        __struct.param_value0 = buf.get_f32_le();
23639        __struct.scale = buf.get_f32_le();
23640        __struct.param_value_min = buf.get_f32_le();
23641        __struct.param_value_max = buf.get_f32_le();
23642        __struct.param_index = buf.get_i16_le();
23643        __struct.target_system = buf.get_u8();
23644        __struct.target_component = buf.get_u8();
23645        for v in &mut __struct.param_id {
23646            let val = buf.get_u8();
23647            *v = val;
23648        }
23649        __struct.parameter_rc_channel_index = buf.get_u8();
23650        Ok(__struct)
23651    }
23652    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23653        let mut __tmp = BytesMut::new(bytes);
23654        #[allow(clippy::absurd_extreme_comparisons)]
23655        #[allow(unused_comparisons)]
23656        if __tmp.remaining() < Self::ENCODED_LEN {
23657            panic!(
23658                "buffer is too small (need {} bytes, but got {})",
23659                Self::ENCODED_LEN,
23660                __tmp.remaining(),
23661            )
23662        }
23663        __tmp.put_f32_le(self.param_value0);
23664        __tmp.put_f32_le(self.scale);
23665        __tmp.put_f32_le(self.param_value_min);
23666        __tmp.put_f32_le(self.param_value_max);
23667        __tmp.put_i16_le(self.param_index);
23668        __tmp.put_u8(self.target_system);
23669        __tmp.put_u8(self.target_component);
23670        for val in &self.param_id {
23671            __tmp.put_u8(*val);
23672        }
23673        __tmp.put_u8(self.parameter_rc_channel_index);
23674        if matches!(version, MavlinkVersion::V2) {
23675            let len = __tmp.len();
23676            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23677        } else {
23678            __tmp.len()
23679        }
23680    }
23681}
23682#[doc = "id: 21"]
23683#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23684#[derive(Debug, Clone, PartialEq)]
23685#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23686#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23687pub struct PARAM_REQUEST_LIST_DATA {
23688    #[doc = "System ID"]
23689    pub target_system: u8,
23690    #[doc = "Component ID"]
23691    pub target_component: u8,
23692}
23693impl PARAM_REQUEST_LIST_DATA {
23694    pub const ENCODED_LEN: usize = 2usize;
23695    pub const DEFAULT: Self = Self {
23696        target_system: 0_u8,
23697        target_component: 0_u8,
23698    };
23699    #[cfg(feature = "arbitrary")]
23700    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23701        use arbitrary::{Arbitrary, Unstructured};
23702        let mut buf = [0u8; 1024];
23703        rng.fill_bytes(&mut buf);
23704        let mut unstructured = Unstructured::new(&buf);
23705        Self::arbitrary(&mut unstructured).unwrap_or_default()
23706    }
23707}
23708impl Default for PARAM_REQUEST_LIST_DATA {
23709    fn default() -> Self {
23710        Self::DEFAULT.clone()
23711    }
23712}
23713impl MessageData for PARAM_REQUEST_LIST_DATA {
23714    type Message = MavMessage;
23715    const ID: u32 = 21u32;
23716    const NAME: &'static str = "PARAM_REQUEST_LIST";
23717    const EXTRA_CRC: u8 = 159u8;
23718    const ENCODED_LEN: usize = 2usize;
23719    fn deser(
23720        _version: MavlinkVersion,
23721        __input: &[u8],
23722    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23723        let avail_len = __input.len();
23724        let mut payload_buf = [0; Self::ENCODED_LEN];
23725        let mut buf = if avail_len < Self::ENCODED_LEN {
23726            payload_buf[0..avail_len].copy_from_slice(__input);
23727            Bytes::new(&payload_buf)
23728        } else {
23729            Bytes::new(__input)
23730        };
23731        let mut __struct = Self::default();
23732        __struct.target_system = buf.get_u8();
23733        __struct.target_component = buf.get_u8();
23734        Ok(__struct)
23735    }
23736    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23737        let mut __tmp = BytesMut::new(bytes);
23738        #[allow(clippy::absurd_extreme_comparisons)]
23739        #[allow(unused_comparisons)]
23740        if __tmp.remaining() < Self::ENCODED_LEN {
23741            panic!(
23742                "buffer is too small (need {} bytes, but got {})",
23743                Self::ENCODED_LEN,
23744                __tmp.remaining(),
23745            )
23746        }
23747        __tmp.put_u8(self.target_system);
23748        __tmp.put_u8(self.target_component);
23749        if matches!(version, MavlinkVersion::V2) {
23750            let len = __tmp.len();
23751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23752        } else {
23753            __tmp.len()
23754        }
23755    }
23756}
23757#[doc = "id: 20"]
23758#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
23759#[derive(Debug, Clone, PartialEq)]
23760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23762pub struct PARAM_REQUEST_READ_DATA {
23763    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
23764    pub param_index: i16,
23765    #[doc = "System ID"]
23766    pub target_system: u8,
23767    #[doc = "Component ID"]
23768    pub target_component: u8,
23769    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23770    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23771    pub param_id: [u8; 16],
23772}
23773impl PARAM_REQUEST_READ_DATA {
23774    pub const ENCODED_LEN: usize = 20usize;
23775    pub const DEFAULT: Self = Self {
23776        param_index: 0_i16,
23777        target_system: 0_u8,
23778        target_component: 0_u8,
23779        param_id: [0_u8; 16usize],
23780    };
23781    #[cfg(feature = "arbitrary")]
23782    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23783        use arbitrary::{Arbitrary, Unstructured};
23784        let mut buf = [0u8; 1024];
23785        rng.fill_bytes(&mut buf);
23786        let mut unstructured = Unstructured::new(&buf);
23787        Self::arbitrary(&mut unstructured).unwrap_or_default()
23788    }
23789}
23790impl Default for PARAM_REQUEST_READ_DATA {
23791    fn default() -> Self {
23792        Self::DEFAULT.clone()
23793    }
23794}
23795impl MessageData for PARAM_REQUEST_READ_DATA {
23796    type Message = MavMessage;
23797    const ID: u32 = 20u32;
23798    const NAME: &'static str = "PARAM_REQUEST_READ";
23799    const EXTRA_CRC: u8 = 214u8;
23800    const ENCODED_LEN: usize = 20usize;
23801    fn deser(
23802        _version: MavlinkVersion,
23803        __input: &[u8],
23804    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23805        let avail_len = __input.len();
23806        let mut payload_buf = [0; Self::ENCODED_LEN];
23807        let mut buf = if avail_len < Self::ENCODED_LEN {
23808            payload_buf[0..avail_len].copy_from_slice(__input);
23809            Bytes::new(&payload_buf)
23810        } else {
23811            Bytes::new(__input)
23812        };
23813        let mut __struct = Self::default();
23814        __struct.param_index = buf.get_i16_le();
23815        __struct.target_system = buf.get_u8();
23816        __struct.target_component = buf.get_u8();
23817        for v in &mut __struct.param_id {
23818            let val = buf.get_u8();
23819            *v = val;
23820        }
23821        Ok(__struct)
23822    }
23823    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23824        let mut __tmp = BytesMut::new(bytes);
23825        #[allow(clippy::absurd_extreme_comparisons)]
23826        #[allow(unused_comparisons)]
23827        if __tmp.remaining() < Self::ENCODED_LEN {
23828            panic!(
23829                "buffer is too small (need {} bytes, but got {})",
23830                Self::ENCODED_LEN,
23831                __tmp.remaining(),
23832            )
23833        }
23834        __tmp.put_i16_le(self.param_index);
23835        __tmp.put_u8(self.target_system);
23836        __tmp.put_u8(self.target_component);
23837        for val in &self.param_id {
23838            __tmp.put_u8(*val);
23839        }
23840        if matches!(version, MavlinkVersion::V2) {
23841            let len = __tmp.len();
23842            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23843        } else {
23844            __tmp.len()
23845        }
23846    }
23847}
23848#[doc = "id: 23"]
23849#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23850#[derive(Debug, Clone, PartialEq)]
23851#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23852#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23853pub struct PARAM_SET_DATA {
23854    #[doc = "Onboard parameter value"]
23855    pub param_value: f32,
23856    #[doc = "System ID"]
23857    pub target_system: u8,
23858    #[doc = "Component ID"]
23859    pub target_component: u8,
23860    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23861    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23862    pub param_id: [u8; 16],
23863    #[doc = "Onboard parameter type."]
23864    pub param_type: MavParamType,
23865}
23866impl PARAM_SET_DATA {
23867    pub const ENCODED_LEN: usize = 23usize;
23868    pub const DEFAULT: Self = Self {
23869        param_value: 0.0_f32,
23870        target_system: 0_u8,
23871        target_component: 0_u8,
23872        param_id: [0_u8; 16usize],
23873        param_type: MavParamType::DEFAULT,
23874    };
23875    #[cfg(feature = "arbitrary")]
23876    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23877        use arbitrary::{Arbitrary, Unstructured};
23878        let mut buf = [0u8; 1024];
23879        rng.fill_bytes(&mut buf);
23880        let mut unstructured = Unstructured::new(&buf);
23881        Self::arbitrary(&mut unstructured).unwrap_or_default()
23882    }
23883}
23884impl Default for PARAM_SET_DATA {
23885    fn default() -> Self {
23886        Self::DEFAULT.clone()
23887    }
23888}
23889impl MessageData for PARAM_SET_DATA {
23890    type Message = MavMessage;
23891    const ID: u32 = 23u32;
23892    const NAME: &'static str = "PARAM_SET";
23893    const EXTRA_CRC: u8 = 168u8;
23894    const ENCODED_LEN: usize = 23usize;
23895    fn deser(
23896        _version: MavlinkVersion,
23897        __input: &[u8],
23898    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23899        let avail_len = __input.len();
23900        let mut payload_buf = [0; Self::ENCODED_LEN];
23901        let mut buf = if avail_len < Self::ENCODED_LEN {
23902            payload_buf[0..avail_len].copy_from_slice(__input);
23903            Bytes::new(&payload_buf)
23904        } else {
23905            Bytes::new(__input)
23906        };
23907        let mut __struct = Self::default();
23908        __struct.param_value = buf.get_f32_le();
23909        __struct.target_system = buf.get_u8();
23910        __struct.target_component = buf.get_u8();
23911        for v in &mut __struct.param_id {
23912            let val = buf.get_u8();
23913            *v = val;
23914        }
23915        let tmp = buf.get_u8();
23916        __struct.param_type =
23917            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23918                enum_type: "MavParamType",
23919                value: tmp as u32,
23920            })?;
23921        Ok(__struct)
23922    }
23923    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23924        let mut __tmp = BytesMut::new(bytes);
23925        #[allow(clippy::absurd_extreme_comparisons)]
23926        #[allow(unused_comparisons)]
23927        if __tmp.remaining() < Self::ENCODED_LEN {
23928            panic!(
23929                "buffer is too small (need {} bytes, but got {})",
23930                Self::ENCODED_LEN,
23931                __tmp.remaining(),
23932            )
23933        }
23934        __tmp.put_f32_le(self.param_value);
23935        __tmp.put_u8(self.target_system);
23936        __tmp.put_u8(self.target_component);
23937        for val in &self.param_id {
23938            __tmp.put_u8(*val);
23939        }
23940        __tmp.put_u8(self.param_type as u8);
23941        if matches!(version, MavlinkVersion::V2) {
23942            let len = __tmp.len();
23943            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23944        } else {
23945            __tmp.len()
23946        }
23947    }
23948}
23949#[doc = "id: 22"]
23950#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23951#[derive(Debug, Clone, PartialEq)]
23952#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23954pub struct PARAM_VALUE_DATA {
23955    #[doc = "Onboard parameter value"]
23956    pub param_value: f32,
23957    #[doc = "Total number of onboard parameters"]
23958    pub param_count: u16,
23959    #[doc = "Index of this onboard parameter"]
23960    pub param_index: u16,
23961    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23962    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23963    pub param_id: [u8; 16],
23964    #[doc = "Onboard parameter type."]
23965    pub param_type: MavParamType,
23966}
23967impl PARAM_VALUE_DATA {
23968    pub const ENCODED_LEN: usize = 25usize;
23969    pub const DEFAULT: Self = Self {
23970        param_value: 0.0_f32,
23971        param_count: 0_u16,
23972        param_index: 0_u16,
23973        param_id: [0_u8; 16usize],
23974        param_type: MavParamType::DEFAULT,
23975    };
23976    #[cfg(feature = "arbitrary")]
23977    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23978        use arbitrary::{Arbitrary, Unstructured};
23979        let mut buf = [0u8; 1024];
23980        rng.fill_bytes(&mut buf);
23981        let mut unstructured = Unstructured::new(&buf);
23982        Self::arbitrary(&mut unstructured).unwrap_or_default()
23983    }
23984}
23985impl Default for PARAM_VALUE_DATA {
23986    fn default() -> Self {
23987        Self::DEFAULT.clone()
23988    }
23989}
23990impl MessageData for PARAM_VALUE_DATA {
23991    type Message = MavMessage;
23992    const ID: u32 = 22u32;
23993    const NAME: &'static str = "PARAM_VALUE";
23994    const EXTRA_CRC: u8 = 220u8;
23995    const ENCODED_LEN: usize = 25usize;
23996    fn deser(
23997        _version: MavlinkVersion,
23998        __input: &[u8],
23999    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24000        let avail_len = __input.len();
24001        let mut payload_buf = [0; Self::ENCODED_LEN];
24002        let mut buf = if avail_len < Self::ENCODED_LEN {
24003            payload_buf[0..avail_len].copy_from_slice(__input);
24004            Bytes::new(&payload_buf)
24005        } else {
24006            Bytes::new(__input)
24007        };
24008        let mut __struct = Self::default();
24009        __struct.param_value = buf.get_f32_le();
24010        __struct.param_count = buf.get_u16_le();
24011        __struct.param_index = buf.get_u16_le();
24012        for v in &mut __struct.param_id {
24013            let val = buf.get_u8();
24014            *v = val;
24015        }
24016        let tmp = buf.get_u8();
24017        __struct.param_type =
24018            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24019                enum_type: "MavParamType",
24020                value: tmp as u32,
24021            })?;
24022        Ok(__struct)
24023    }
24024    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24025        let mut __tmp = BytesMut::new(bytes);
24026        #[allow(clippy::absurd_extreme_comparisons)]
24027        #[allow(unused_comparisons)]
24028        if __tmp.remaining() < Self::ENCODED_LEN {
24029            panic!(
24030                "buffer is too small (need {} bytes, but got {})",
24031                Self::ENCODED_LEN,
24032                __tmp.remaining(),
24033            )
24034        }
24035        __tmp.put_f32_le(self.param_value);
24036        __tmp.put_u16_le(self.param_count);
24037        __tmp.put_u16_le(self.param_index);
24038        for val in &self.param_id {
24039            __tmp.put_u8(*val);
24040        }
24041        __tmp.put_u8(self.param_type as u8);
24042        if matches!(version, MavlinkVersion::V2) {
24043            let len = __tmp.len();
24044            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24045        } else {
24046            __tmp.len()
24047        }
24048    }
24049}
24050#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24051#[doc = "id: 4"]
24052#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24053#[derive(Debug, Clone, PartialEq)]
24054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24055#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24056pub struct PING_DATA {
24057    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24058    pub time_usec: u64,
24059    #[doc = "PING sequence"]
24060    pub seq: u32,
24061    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24062    pub target_system: u8,
24063    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24064    pub target_component: u8,
24065}
24066impl PING_DATA {
24067    pub const ENCODED_LEN: usize = 14usize;
24068    pub const DEFAULT: Self = Self {
24069        time_usec: 0_u64,
24070        seq: 0_u32,
24071        target_system: 0_u8,
24072        target_component: 0_u8,
24073    };
24074    #[cfg(feature = "arbitrary")]
24075    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24076        use arbitrary::{Arbitrary, Unstructured};
24077        let mut buf = [0u8; 1024];
24078        rng.fill_bytes(&mut buf);
24079        let mut unstructured = Unstructured::new(&buf);
24080        Self::arbitrary(&mut unstructured).unwrap_or_default()
24081    }
24082}
24083impl Default for PING_DATA {
24084    fn default() -> Self {
24085        Self::DEFAULT.clone()
24086    }
24087}
24088impl MessageData for PING_DATA {
24089    type Message = MavMessage;
24090    const ID: u32 = 4u32;
24091    const NAME: &'static str = "PING";
24092    const EXTRA_CRC: u8 = 237u8;
24093    const ENCODED_LEN: usize = 14usize;
24094    fn deser(
24095        _version: MavlinkVersion,
24096        __input: &[u8],
24097    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24098        let avail_len = __input.len();
24099        let mut payload_buf = [0; Self::ENCODED_LEN];
24100        let mut buf = if avail_len < Self::ENCODED_LEN {
24101            payload_buf[0..avail_len].copy_from_slice(__input);
24102            Bytes::new(&payload_buf)
24103        } else {
24104            Bytes::new(__input)
24105        };
24106        let mut __struct = Self::default();
24107        __struct.time_usec = buf.get_u64_le();
24108        __struct.seq = buf.get_u32_le();
24109        __struct.target_system = buf.get_u8();
24110        __struct.target_component = buf.get_u8();
24111        Ok(__struct)
24112    }
24113    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24114        let mut __tmp = BytesMut::new(bytes);
24115        #[allow(clippy::absurd_extreme_comparisons)]
24116        #[allow(unused_comparisons)]
24117        if __tmp.remaining() < Self::ENCODED_LEN {
24118            panic!(
24119                "buffer is too small (need {} bytes, but got {})",
24120                Self::ENCODED_LEN,
24121                __tmp.remaining(),
24122            )
24123        }
24124        __tmp.put_u64_le(self.time_usec);
24125        __tmp.put_u32_le(self.seq);
24126        __tmp.put_u8(self.target_system);
24127        __tmp.put_u8(self.target_component);
24128        if matches!(version, MavlinkVersion::V2) {
24129            let len = __tmp.len();
24130            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24131        } else {
24132            __tmp.len()
24133        }
24134    }
24135}
24136#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24137#[doc = "id: 258"]
24138#[doc = "Control vehicle tone generation (buzzer)."]
24139#[derive(Debug, Clone, PartialEq)]
24140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24141#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24142pub struct PLAY_TUNE_DATA {
24143    #[doc = "System ID"]
24144    pub target_system: u8,
24145    #[doc = "Component ID"]
24146    pub target_component: u8,
24147    #[doc = "tune in board specific format"]
24148    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24149    pub tune: [u8; 30],
24150    #[doc = "tune extension (appended to tune)"]
24151    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24152    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24153    pub tune2: [u8; 200],
24154}
24155impl PLAY_TUNE_DATA {
24156    pub const ENCODED_LEN: usize = 232usize;
24157    pub const DEFAULT: Self = Self {
24158        target_system: 0_u8,
24159        target_component: 0_u8,
24160        tune: [0_u8; 30usize],
24161        tune2: [0_u8; 200usize],
24162    };
24163    #[cfg(feature = "arbitrary")]
24164    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24165        use arbitrary::{Arbitrary, Unstructured};
24166        let mut buf = [0u8; 1024];
24167        rng.fill_bytes(&mut buf);
24168        let mut unstructured = Unstructured::new(&buf);
24169        Self::arbitrary(&mut unstructured).unwrap_or_default()
24170    }
24171}
24172impl Default for PLAY_TUNE_DATA {
24173    fn default() -> Self {
24174        Self::DEFAULT.clone()
24175    }
24176}
24177impl MessageData for PLAY_TUNE_DATA {
24178    type Message = MavMessage;
24179    const ID: u32 = 258u32;
24180    const NAME: &'static str = "PLAY_TUNE";
24181    const EXTRA_CRC: u8 = 187u8;
24182    const ENCODED_LEN: usize = 232usize;
24183    fn deser(
24184        _version: MavlinkVersion,
24185        __input: &[u8],
24186    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24187        let avail_len = __input.len();
24188        let mut payload_buf = [0; Self::ENCODED_LEN];
24189        let mut buf = if avail_len < Self::ENCODED_LEN {
24190            payload_buf[0..avail_len].copy_from_slice(__input);
24191            Bytes::new(&payload_buf)
24192        } else {
24193            Bytes::new(__input)
24194        };
24195        let mut __struct = Self::default();
24196        __struct.target_system = buf.get_u8();
24197        __struct.target_component = buf.get_u8();
24198        for v in &mut __struct.tune {
24199            let val = buf.get_u8();
24200            *v = val;
24201        }
24202        for v in &mut __struct.tune2 {
24203            let val = buf.get_u8();
24204            *v = val;
24205        }
24206        Ok(__struct)
24207    }
24208    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24209        let mut __tmp = BytesMut::new(bytes);
24210        #[allow(clippy::absurd_extreme_comparisons)]
24211        #[allow(unused_comparisons)]
24212        if __tmp.remaining() < Self::ENCODED_LEN {
24213            panic!(
24214                "buffer is too small (need {} bytes, but got {})",
24215                Self::ENCODED_LEN,
24216                __tmp.remaining(),
24217            )
24218        }
24219        __tmp.put_u8(self.target_system);
24220        __tmp.put_u8(self.target_component);
24221        for val in &self.tune {
24222            __tmp.put_u8(*val);
24223        }
24224        for val in &self.tune2 {
24225            __tmp.put_u8(*val);
24226        }
24227        if matches!(version, MavlinkVersion::V2) {
24228            let len = __tmp.len();
24229            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24230        } else {
24231            __tmp.len()
24232        }
24233    }
24234}
24235#[doc = "id: 400"]
24236#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24237#[derive(Debug, Clone, PartialEq)]
24238#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24239#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24240pub struct PLAY_TUNE_V2_DATA {
24241    #[doc = "Tune format"]
24242    pub format: TuneFormat,
24243    #[doc = "System ID"]
24244    pub target_system: u8,
24245    #[doc = "Component ID"]
24246    pub target_component: u8,
24247    #[doc = "Tune definition as a NULL-terminated string."]
24248    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24249    pub tune: [u8; 248],
24250}
24251impl PLAY_TUNE_V2_DATA {
24252    pub const ENCODED_LEN: usize = 254usize;
24253    pub const DEFAULT: Self = Self {
24254        format: TuneFormat::DEFAULT,
24255        target_system: 0_u8,
24256        target_component: 0_u8,
24257        tune: [0_u8; 248usize],
24258    };
24259    #[cfg(feature = "arbitrary")]
24260    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24261        use arbitrary::{Arbitrary, Unstructured};
24262        let mut buf = [0u8; 1024];
24263        rng.fill_bytes(&mut buf);
24264        let mut unstructured = Unstructured::new(&buf);
24265        Self::arbitrary(&mut unstructured).unwrap_or_default()
24266    }
24267}
24268impl Default for PLAY_TUNE_V2_DATA {
24269    fn default() -> Self {
24270        Self::DEFAULT.clone()
24271    }
24272}
24273impl MessageData for PLAY_TUNE_V2_DATA {
24274    type Message = MavMessage;
24275    const ID: u32 = 400u32;
24276    const NAME: &'static str = "PLAY_TUNE_V2";
24277    const EXTRA_CRC: u8 = 110u8;
24278    const ENCODED_LEN: usize = 254usize;
24279    fn deser(
24280        _version: MavlinkVersion,
24281        __input: &[u8],
24282    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24283        let avail_len = __input.len();
24284        let mut payload_buf = [0; Self::ENCODED_LEN];
24285        let mut buf = if avail_len < Self::ENCODED_LEN {
24286            payload_buf[0..avail_len].copy_from_slice(__input);
24287            Bytes::new(&payload_buf)
24288        } else {
24289            Bytes::new(__input)
24290        };
24291        let mut __struct = Self::default();
24292        let tmp = buf.get_u32_le();
24293        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24294            ::mavlink_core::error::ParserError::InvalidEnum {
24295                enum_type: "TuneFormat",
24296                value: tmp as u32,
24297            },
24298        )?;
24299        __struct.target_system = buf.get_u8();
24300        __struct.target_component = buf.get_u8();
24301        for v in &mut __struct.tune {
24302            let val = buf.get_u8();
24303            *v = val;
24304        }
24305        Ok(__struct)
24306    }
24307    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24308        let mut __tmp = BytesMut::new(bytes);
24309        #[allow(clippy::absurd_extreme_comparisons)]
24310        #[allow(unused_comparisons)]
24311        if __tmp.remaining() < Self::ENCODED_LEN {
24312            panic!(
24313                "buffer is too small (need {} bytes, but got {})",
24314                Self::ENCODED_LEN,
24315                __tmp.remaining(),
24316            )
24317        }
24318        __tmp.put_u32_le(self.format as u32);
24319        __tmp.put_u8(self.target_system);
24320        __tmp.put_u8(self.target_component);
24321        for val in &self.tune {
24322            __tmp.put_u8(*val);
24323        }
24324        if matches!(version, MavlinkVersion::V2) {
24325            let len = __tmp.len();
24326            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24327        } else {
24328            __tmp.len()
24329        }
24330    }
24331}
24332#[doc = "id: 87"]
24333#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24334#[derive(Debug, Clone, PartialEq)]
24335#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24336#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24337pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24338    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24339    pub time_boot_ms: u32,
24340    #[doc = "Latitude in WGS84 frame"]
24341    pub lat_int: i32,
24342    #[doc = "Longitude in WGS84 frame"]
24343    pub lon_int: i32,
24344    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24345    pub alt: f32,
24346    #[doc = "X velocity in NED frame"]
24347    pub vx: f32,
24348    #[doc = "Y velocity in NED frame"]
24349    pub vy: f32,
24350    #[doc = "Z velocity in NED frame"]
24351    pub vz: f32,
24352    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24353    pub afx: f32,
24354    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24355    pub afy: f32,
24356    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24357    pub afz: f32,
24358    #[doc = "yaw setpoint"]
24359    pub yaw: f32,
24360    #[doc = "yaw rate setpoint"]
24361    pub yaw_rate: f32,
24362    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24363    pub type_mask: PositionTargetTypemask,
24364    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24365    pub coordinate_frame: MavFrame,
24366}
24367impl POSITION_TARGET_GLOBAL_INT_DATA {
24368    pub const ENCODED_LEN: usize = 51usize;
24369    pub const DEFAULT: Self = Self {
24370        time_boot_ms: 0_u32,
24371        lat_int: 0_i32,
24372        lon_int: 0_i32,
24373        alt: 0.0_f32,
24374        vx: 0.0_f32,
24375        vy: 0.0_f32,
24376        vz: 0.0_f32,
24377        afx: 0.0_f32,
24378        afy: 0.0_f32,
24379        afz: 0.0_f32,
24380        yaw: 0.0_f32,
24381        yaw_rate: 0.0_f32,
24382        type_mask: PositionTargetTypemask::DEFAULT,
24383        coordinate_frame: MavFrame::DEFAULT,
24384    };
24385    #[cfg(feature = "arbitrary")]
24386    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24387        use arbitrary::{Arbitrary, Unstructured};
24388        let mut buf = [0u8; 1024];
24389        rng.fill_bytes(&mut buf);
24390        let mut unstructured = Unstructured::new(&buf);
24391        Self::arbitrary(&mut unstructured).unwrap_or_default()
24392    }
24393}
24394impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24395    fn default() -> Self {
24396        Self::DEFAULT.clone()
24397    }
24398}
24399impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24400    type Message = MavMessage;
24401    const ID: u32 = 87u32;
24402    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24403    const EXTRA_CRC: u8 = 150u8;
24404    const ENCODED_LEN: usize = 51usize;
24405    fn deser(
24406        _version: MavlinkVersion,
24407        __input: &[u8],
24408    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24409        let avail_len = __input.len();
24410        let mut payload_buf = [0; Self::ENCODED_LEN];
24411        let mut buf = if avail_len < Self::ENCODED_LEN {
24412            payload_buf[0..avail_len].copy_from_slice(__input);
24413            Bytes::new(&payload_buf)
24414        } else {
24415            Bytes::new(__input)
24416        };
24417        let mut __struct = Self::default();
24418        __struct.time_boot_ms = buf.get_u32_le();
24419        __struct.lat_int = buf.get_i32_le();
24420        __struct.lon_int = buf.get_i32_le();
24421        __struct.alt = buf.get_f32_le();
24422        __struct.vx = buf.get_f32_le();
24423        __struct.vy = buf.get_f32_le();
24424        __struct.vz = buf.get_f32_le();
24425        __struct.afx = buf.get_f32_le();
24426        __struct.afy = buf.get_f32_le();
24427        __struct.afz = buf.get_f32_le();
24428        __struct.yaw = buf.get_f32_le();
24429        __struct.yaw_rate = buf.get_f32_le();
24430        let tmp = buf.get_u16_le();
24431        __struct.type_mask = PositionTargetTypemask::from_bits(
24432            tmp & PositionTargetTypemask::all().bits(),
24433        )
24434        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24435            flag_type: "PositionTargetTypemask",
24436            value: tmp as u32,
24437        })?;
24438        let tmp = buf.get_u8();
24439        __struct.coordinate_frame =
24440            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24441                enum_type: "MavFrame",
24442                value: tmp as u32,
24443            })?;
24444        Ok(__struct)
24445    }
24446    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24447        let mut __tmp = BytesMut::new(bytes);
24448        #[allow(clippy::absurd_extreme_comparisons)]
24449        #[allow(unused_comparisons)]
24450        if __tmp.remaining() < Self::ENCODED_LEN {
24451            panic!(
24452                "buffer is too small (need {} bytes, but got {})",
24453                Self::ENCODED_LEN,
24454                __tmp.remaining(),
24455            )
24456        }
24457        __tmp.put_u32_le(self.time_boot_ms);
24458        __tmp.put_i32_le(self.lat_int);
24459        __tmp.put_i32_le(self.lon_int);
24460        __tmp.put_f32_le(self.alt);
24461        __tmp.put_f32_le(self.vx);
24462        __tmp.put_f32_le(self.vy);
24463        __tmp.put_f32_le(self.vz);
24464        __tmp.put_f32_le(self.afx);
24465        __tmp.put_f32_le(self.afy);
24466        __tmp.put_f32_le(self.afz);
24467        __tmp.put_f32_le(self.yaw);
24468        __tmp.put_f32_le(self.yaw_rate);
24469        __tmp.put_u16_le(self.type_mask.bits());
24470        __tmp.put_u8(self.coordinate_frame as u8);
24471        if matches!(version, MavlinkVersion::V2) {
24472            let len = __tmp.len();
24473            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24474        } else {
24475            __tmp.len()
24476        }
24477    }
24478}
24479#[doc = "id: 85"]
24480#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24481#[derive(Debug, Clone, PartialEq)]
24482#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24483#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24484pub struct POSITION_TARGET_LOCAL_NED_DATA {
24485    #[doc = "Timestamp (time since system boot)."]
24486    pub time_boot_ms: u32,
24487    #[doc = "X Position in NED frame"]
24488    pub x: f32,
24489    #[doc = "Y Position in NED frame"]
24490    pub y: f32,
24491    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24492    pub z: f32,
24493    #[doc = "X velocity in NED frame"]
24494    pub vx: f32,
24495    #[doc = "Y velocity in NED frame"]
24496    pub vy: f32,
24497    #[doc = "Z velocity in NED frame"]
24498    pub vz: f32,
24499    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24500    pub afx: f32,
24501    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24502    pub afy: f32,
24503    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24504    pub afz: f32,
24505    #[doc = "yaw setpoint"]
24506    pub yaw: f32,
24507    #[doc = "yaw rate setpoint"]
24508    pub yaw_rate: f32,
24509    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24510    pub type_mask: PositionTargetTypemask,
24511    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24512    pub coordinate_frame: MavFrame,
24513}
24514impl POSITION_TARGET_LOCAL_NED_DATA {
24515    pub const ENCODED_LEN: usize = 51usize;
24516    pub const DEFAULT: Self = Self {
24517        time_boot_ms: 0_u32,
24518        x: 0.0_f32,
24519        y: 0.0_f32,
24520        z: 0.0_f32,
24521        vx: 0.0_f32,
24522        vy: 0.0_f32,
24523        vz: 0.0_f32,
24524        afx: 0.0_f32,
24525        afy: 0.0_f32,
24526        afz: 0.0_f32,
24527        yaw: 0.0_f32,
24528        yaw_rate: 0.0_f32,
24529        type_mask: PositionTargetTypemask::DEFAULT,
24530        coordinate_frame: MavFrame::DEFAULT,
24531    };
24532    #[cfg(feature = "arbitrary")]
24533    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24534        use arbitrary::{Arbitrary, Unstructured};
24535        let mut buf = [0u8; 1024];
24536        rng.fill_bytes(&mut buf);
24537        let mut unstructured = Unstructured::new(&buf);
24538        Self::arbitrary(&mut unstructured).unwrap_or_default()
24539    }
24540}
24541impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24542    fn default() -> Self {
24543        Self::DEFAULT.clone()
24544    }
24545}
24546impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24547    type Message = MavMessage;
24548    const ID: u32 = 85u32;
24549    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24550    const EXTRA_CRC: u8 = 140u8;
24551    const ENCODED_LEN: usize = 51usize;
24552    fn deser(
24553        _version: MavlinkVersion,
24554        __input: &[u8],
24555    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24556        let avail_len = __input.len();
24557        let mut payload_buf = [0; Self::ENCODED_LEN];
24558        let mut buf = if avail_len < Self::ENCODED_LEN {
24559            payload_buf[0..avail_len].copy_from_slice(__input);
24560            Bytes::new(&payload_buf)
24561        } else {
24562            Bytes::new(__input)
24563        };
24564        let mut __struct = Self::default();
24565        __struct.time_boot_ms = buf.get_u32_le();
24566        __struct.x = buf.get_f32_le();
24567        __struct.y = buf.get_f32_le();
24568        __struct.z = buf.get_f32_le();
24569        __struct.vx = buf.get_f32_le();
24570        __struct.vy = buf.get_f32_le();
24571        __struct.vz = buf.get_f32_le();
24572        __struct.afx = buf.get_f32_le();
24573        __struct.afy = buf.get_f32_le();
24574        __struct.afz = buf.get_f32_le();
24575        __struct.yaw = buf.get_f32_le();
24576        __struct.yaw_rate = buf.get_f32_le();
24577        let tmp = buf.get_u16_le();
24578        __struct.type_mask = PositionTargetTypemask::from_bits(
24579            tmp & PositionTargetTypemask::all().bits(),
24580        )
24581        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24582            flag_type: "PositionTargetTypemask",
24583            value: tmp as u32,
24584        })?;
24585        let tmp = buf.get_u8();
24586        __struct.coordinate_frame =
24587            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24588                enum_type: "MavFrame",
24589                value: tmp as u32,
24590            })?;
24591        Ok(__struct)
24592    }
24593    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24594        let mut __tmp = BytesMut::new(bytes);
24595        #[allow(clippy::absurd_extreme_comparisons)]
24596        #[allow(unused_comparisons)]
24597        if __tmp.remaining() < Self::ENCODED_LEN {
24598            panic!(
24599                "buffer is too small (need {} bytes, but got {})",
24600                Self::ENCODED_LEN,
24601                __tmp.remaining(),
24602            )
24603        }
24604        __tmp.put_u32_le(self.time_boot_ms);
24605        __tmp.put_f32_le(self.x);
24606        __tmp.put_f32_le(self.y);
24607        __tmp.put_f32_le(self.z);
24608        __tmp.put_f32_le(self.vx);
24609        __tmp.put_f32_le(self.vy);
24610        __tmp.put_f32_le(self.vz);
24611        __tmp.put_f32_le(self.afx);
24612        __tmp.put_f32_le(self.afy);
24613        __tmp.put_f32_le(self.afz);
24614        __tmp.put_f32_le(self.yaw);
24615        __tmp.put_f32_le(self.yaw_rate);
24616        __tmp.put_u16_le(self.type_mask.bits());
24617        __tmp.put_u8(self.coordinate_frame as u8);
24618        if matches!(version, MavlinkVersion::V2) {
24619            let len = __tmp.len();
24620            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24621        } else {
24622            __tmp.len()
24623        }
24624    }
24625}
24626#[doc = "id: 125"]
24627#[doc = "Power supply status."]
24628#[derive(Debug, Clone, PartialEq)]
24629#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24630#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24631pub struct POWER_STATUS_DATA {
24632    #[doc = "5V rail voltage."]
24633    pub Vcc: u16,
24634    #[doc = "Servo rail voltage."]
24635    pub Vservo: u16,
24636    #[doc = "Bitmap of power supply status flags."]
24637    pub flags: MavPowerStatus,
24638}
24639impl POWER_STATUS_DATA {
24640    pub const ENCODED_LEN: usize = 6usize;
24641    pub const DEFAULT: Self = Self {
24642        Vcc: 0_u16,
24643        Vservo: 0_u16,
24644        flags: MavPowerStatus::DEFAULT,
24645    };
24646    #[cfg(feature = "arbitrary")]
24647    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24648        use arbitrary::{Arbitrary, Unstructured};
24649        let mut buf = [0u8; 1024];
24650        rng.fill_bytes(&mut buf);
24651        let mut unstructured = Unstructured::new(&buf);
24652        Self::arbitrary(&mut unstructured).unwrap_or_default()
24653    }
24654}
24655impl Default for POWER_STATUS_DATA {
24656    fn default() -> Self {
24657        Self::DEFAULT.clone()
24658    }
24659}
24660impl MessageData for POWER_STATUS_DATA {
24661    type Message = MavMessage;
24662    const ID: u32 = 125u32;
24663    const NAME: &'static str = "POWER_STATUS";
24664    const EXTRA_CRC: u8 = 203u8;
24665    const ENCODED_LEN: usize = 6usize;
24666    fn deser(
24667        _version: MavlinkVersion,
24668        __input: &[u8],
24669    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24670        let avail_len = __input.len();
24671        let mut payload_buf = [0; Self::ENCODED_LEN];
24672        let mut buf = if avail_len < Self::ENCODED_LEN {
24673            payload_buf[0..avail_len].copy_from_slice(__input);
24674            Bytes::new(&payload_buf)
24675        } else {
24676            Bytes::new(__input)
24677        };
24678        let mut __struct = Self::default();
24679        __struct.Vcc = buf.get_u16_le();
24680        __struct.Vservo = buf.get_u16_le();
24681        let tmp = buf.get_u16_le();
24682        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
24683            ::mavlink_core::error::ParserError::InvalidFlag {
24684                flag_type: "MavPowerStatus",
24685                value: tmp as u32,
24686            },
24687        )?;
24688        Ok(__struct)
24689    }
24690    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24691        let mut __tmp = BytesMut::new(bytes);
24692        #[allow(clippy::absurd_extreme_comparisons)]
24693        #[allow(unused_comparisons)]
24694        if __tmp.remaining() < Self::ENCODED_LEN {
24695            panic!(
24696                "buffer is too small (need {} bytes, but got {})",
24697                Self::ENCODED_LEN,
24698                __tmp.remaining(),
24699            )
24700        }
24701        __tmp.put_u16_le(self.Vcc);
24702        __tmp.put_u16_le(self.Vservo);
24703        __tmp.put_u16_le(self.flags.bits());
24704        if matches!(version, MavlinkVersion::V2) {
24705            let len = __tmp.len();
24706            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24707        } else {
24708            __tmp.len()
24709        }
24710    }
24711}
24712#[doc = "id: 300"]
24713#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
24714#[derive(Debug, Clone, PartialEq)]
24715#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24716#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24717pub struct PROTOCOL_VERSION_DATA {
24718    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
24719    pub version: u16,
24720    #[doc = "Minimum MAVLink version supported"]
24721    pub min_version: u16,
24722    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
24723    pub max_version: u16,
24724    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24725    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24726    pub spec_version_hash: [u8; 8],
24727    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24728    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24729    pub library_version_hash: [u8; 8],
24730}
24731impl PROTOCOL_VERSION_DATA {
24732    pub const ENCODED_LEN: usize = 22usize;
24733    pub const DEFAULT: Self = Self {
24734        version: 0_u16,
24735        min_version: 0_u16,
24736        max_version: 0_u16,
24737        spec_version_hash: [0_u8; 8usize],
24738        library_version_hash: [0_u8; 8usize],
24739    };
24740    #[cfg(feature = "arbitrary")]
24741    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24742        use arbitrary::{Arbitrary, Unstructured};
24743        let mut buf = [0u8; 1024];
24744        rng.fill_bytes(&mut buf);
24745        let mut unstructured = Unstructured::new(&buf);
24746        Self::arbitrary(&mut unstructured).unwrap_or_default()
24747    }
24748}
24749impl Default for PROTOCOL_VERSION_DATA {
24750    fn default() -> Self {
24751        Self::DEFAULT.clone()
24752    }
24753}
24754impl MessageData for PROTOCOL_VERSION_DATA {
24755    type Message = MavMessage;
24756    const ID: u32 = 300u32;
24757    const NAME: &'static str = "PROTOCOL_VERSION";
24758    const EXTRA_CRC: u8 = 217u8;
24759    const ENCODED_LEN: usize = 22usize;
24760    fn deser(
24761        _version: MavlinkVersion,
24762        __input: &[u8],
24763    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24764        let avail_len = __input.len();
24765        let mut payload_buf = [0; Self::ENCODED_LEN];
24766        let mut buf = if avail_len < Self::ENCODED_LEN {
24767            payload_buf[0..avail_len].copy_from_slice(__input);
24768            Bytes::new(&payload_buf)
24769        } else {
24770            Bytes::new(__input)
24771        };
24772        let mut __struct = Self::default();
24773        __struct.version = buf.get_u16_le();
24774        __struct.min_version = buf.get_u16_le();
24775        __struct.max_version = buf.get_u16_le();
24776        for v in &mut __struct.spec_version_hash {
24777            let val = buf.get_u8();
24778            *v = val;
24779        }
24780        for v in &mut __struct.library_version_hash {
24781            let val = buf.get_u8();
24782            *v = val;
24783        }
24784        Ok(__struct)
24785    }
24786    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24787        let mut __tmp = BytesMut::new(bytes);
24788        #[allow(clippy::absurd_extreme_comparisons)]
24789        #[allow(unused_comparisons)]
24790        if __tmp.remaining() < Self::ENCODED_LEN {
24791            panic!(
24792                "buffer is too small (need {} bytes, but got {})",
24793                Self::ENCODED_LEN,
24794                __tmp.remaining(),
24795            )
24796        }
24797        __tmp.put_u16_le(self.version);
24798        __tmp.put_u16_le(self.min_version);
24799        __tmp.put_u16_le(self.max_version);
24800        for val in &self.spec_version_hash {
24801            __tmp.put_u8(*val);
24802        }
24803        for val in &self.library_version_hash {
24804            __tmp.put_u8(*val);
24805        }
24806        if matches!(version, MavlinkVersion::V2) {
24807            let len = __tmp.len();
24808            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24809        } else {
24810            __tmp.len()
24811        }
24812    }
24813}
24814#[doc = "id: 109"]
24815#[doc = "Status generated by radio and injected into MAVLink stream."]
24816#[derive(Debug, Clone, PartialEq)]
24817#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24819pub struct RADIO_STATUS_DATA {
24820    #[doc = "Count of radio packet receive errors (since boot)."]
24821    pub rxerrors: u16,
24822    #[doc = "Count of error corrected radio packets (since boot)."]
24823    pub fixed: u16,
24824    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24825    pub rssi: u8,
24826    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24827    pub remrssi: u8,
24828    #[doc = "Remaining free transmitter buffer space."]
24829    pub txbuf: u8,
24830    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24831    pub noise: u8,
24832    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24833    pub remnoise: u8,
24834}
24835impl RADIO_STATUS_DATA {
24836    pub const ENCODED_LEN: usize = 9usize;
24837    pub const DEFAULT: Self = Self {
24838        rxerrors: 0_u16,
24839        fixed: 0_u16,
24840        rssi: 0_u8,
24841        remrssi: 0_u8,
24842        txbuf: 0_u8,
24843        noise: 0_u8,
24844        remnoise: 0_u8,
24845    };
24846    #[cfg(feature = "arbitrary")]
24847    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24848        use arbitrary::{Arbitrary, Unstructured};
24849        let mut buf = [0u8; 1024];
24850        rng.fill_bytes(&mut buf);
24851        let mut unstructured = Unstructured::new(&buf);
24852        Self::arbitrary(&mut unstructured).unwrap_or_default()
24853    }
24854}
24855impl Default for RADIO_STATUS_DATA {
24856    fn default() -> Self {
24857        Self::DEFAULT.clone()
24858    }
24859}
24860impl MessageData for RADIO_STATUS_DATA {
24861    type Message = MavMessage;
24862    const ID: u32 = 109u32;
24863    const NAME: &'static str = "RADIO_STATUS";
24864    const EXTRA_CRC: u8 = 185u8;
24865    const ENCODED_LEN: usize = 9usize;
24866    fn deser(
24867        _version: MavlinkVersion,
24868        __input: &[u8],
24869    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24870        let avail_len = __input.len();
24871        let mut payload_buf = [0; Self::ENCODED_LEN];
24872        let mut buf = if avail_len < Self::ENCODED_LEN {
24873            payload_buf[0..avail_len].copy_from_slice(__input);
24874            Bytes::new(&payload_buf)
24875        } else {
24876            Bytes::new(__input)
24877        };
24878        let mut __struct = Self::default();
24879        __struct.rxerrors = buf.get_u16_le();
24880        __struct.fixed = buf.get_u16_le();
24881        __struct.rssi = buf.get_u8();
24882        __struct.remrssi = buf.get_u8();
24883        __struct.txbuf = buf.get_u8();
24884        __struct.noise = buf.get_u8();
24885        __struct.remnoise = buf.get_u8();
24886        Ok(__struct)
24887    }
24888    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24889        let mut __tmp = BytesMut::new(bytes);
24890        #[allow(clippy::absurd_extreme_comparisons)]
24891        #[allow(unused_comparisons)]
24892        if __tmp.remaining() < Self::ENCODED_LEN {
24893            panic!(
24894                "buffer is too small (need {} bytes, but got {})",
24895                Self::ENCODED_LEN,
24896                __tmp.remaining(),
24897            )
24898        }
24899        __tmp.put_u16_le(self.rxerrors);
24900        __tmp.put_u16_le(self.fixed);
24901        __tmp.put_u8(self.rssi);
24902        __tmp.put_u8(self.remrssi);
24903        __tmp.put_u8(self.txbuf);
24904        __tmp.put_u8(self.noise);
24905        __tmp.put_u8(self.remnoise);
24906        if matches!(version, MavlinkVersion::V2) {
24907            let len = __tmp.len();
24908            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24909        } else {
24910            __tmp.len()
24911        }
24912    }
24913}
24914#[doc = "id: 27"]
24915#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
24916#[derive(Debug, Clone, PartialEq)]
24917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24919pub struct RAW_IMU_DATA {
24920    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24921    pub time_usec: u64,
24922    #[doc = "X acceleration (raw)"]
24923    pub xacc: i16,
24924    #[doc = "Y acceleration (raw)"]
24925    pub yacc: i16,
24926    #[doc = "Z acceleration (raw)"]
24927    pub zacc: i16,
24928    #[doc = "Angular speed around X axis (raw)"]
24929    pub xgyro: i16,
24930    #[doc = "Angular speed around Y axis (raw)"]
24931    pub ygyro: i16,
24932    #[doc = "Angular speed around Z axis (raw)"]
24933    pub zgyro: i16,
24934    #[doc = "X Magnetic field (raw)"]
24935    pub xmag: i16,
24936    #[doc = "Y Magnetic field (raw)"]
24937    pub ymag: i16,
24938    #[doc = "Z Magnetic field (raw)"]
24939    pub zmag: i16,
24940    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
24941    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24942    pub id: u8,
24943    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
24944    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24945    pub temperature: i16,
24946}
24947impl RAW_IMU_DATA {
24948    pub const ENCODED_LEN: usize = 29usize;
24949    pub const DEFAULT: Self = Self {
24950        time_usec: 0_u64,
24951        xacc: 0_i16,
24952        yacc: 0_i16,
24953        zacc: 0_i16,
24954        xgyro: 0_i16,
24955        ygyro: 0_i16,
24956        zgyro: 0_i16,
24957        xmag: 0_i16,
24958        ymag: 0_i16,
24959        zmag: 0_i16,
24960        id: 0_u8,
24961        temperature: 0_i16,
24962    };
24963    #[cfg(feature = "arbitrary")]
24964    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24965        use arbitrary::{Arbitrary, Unstructured};
24966        let mut buf = [0u8; 1024];
24967        rng.fill_bytes(&mut buf);
24968        let mut unstructured = Unstructured::new(&buf);
24969        Self::arbitrary(&mut unstructured).unwrap_or_default()
24970    }
24971}
24972impl Default for RAW_IMU_DATA {
24973    fn default() -> Self {
24974        Self::DEFAULT.clone()
24975    }
24976}
24977impl MessageData for RAW_IMU_DATA {
24978    type Message = MavMessage;
24979    const ID: u32 = 27u32;
24980    const NAME: &'static str = "RAW_IMU";
24981    const EXTRA_CRC: u8 = 144u8;
24982    const ENCODED_LEN: usize = 29usize;
24983    fn deser(
24984        _version: MavlinkVersion,
24985        __input: &[u8],
24986    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24987        let avail_len = __input.len();
24988        let mut payload_buf = [0; Self::ENCODED_LEN];
24989        let mut buf = if avail_len < Self::ENCODED_LEN {
24990            payload_buf[0..avail_len].copy_from_slice(__input);
24991            Bytes::new(&payload_buf)
24992        } else {
24993            Bytes::new(__input)
24994        };
24995        let mut __struct = Self::default();
24996        __struct.time_usec = buf.get_u64_le();
24997        __struct.xacc = buf.get_i16_le();
24998        __struct.yacc = buf.get_i16_le();
24999        __struct.zacc = buf.get_i16_le();
25000        __struct.xgyro = buf.get_i16_le();
25001        __struct.ygyro = buf.get_i16_le();
25002        __struct.zgyro = buf.get_i16_le();
25003        __struct.xmag = buf.get_i16_le();
25004        __struct.ymag = buf.get_i16_le();
25005        __struct.zmag = buf.get_i16_le();
25006        __struct.id = buf.get_u8();
25007        __struct.temperature = buf.get_i16_le();
25008        Ok(__struct)
25009    }
25010    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25011        let mut __tmp = BytesMut::new(bytes);
25012        #[allow(clippy::absurd_extreme_comparisons)]
25013        #[allow(unused_comparisons)]
25014        if __tmp.remaining() < Self::ENCODED_LEN {
25015            panic!(
25016                "buffer is too small (need {} bytes, but got {})",
25017                Self::ENCODED_LEN,
25018                __tmp.remaining(),
25019            )
25020        }
25021        __tmp.put_u64_le(self.time_usec);
25022        __tmp.put_i16_le(self.xacc);
25023        __tmp.put_i16_le(self.yacc);
25024        __tmp.put_i16_le(self.zacc);
25025        __tmp.put_i16_le(self.xgyro);
25026        __tmp.put_i16_le(self.ygyro);
25027        __tmp.put_i16_le(self.zgyro);
25028        __tmp.put_i16_le(self.xmag);
25029        __tmp.put_i16_le(self.ymag);
25030        __tmp.put_i16_le(self.zmag);
25031        __tmp.put_u8(self.id);
25032        __tmp.put_i16_le(self.temperature);
25033        if matches!(version, MavlinkVersion::V2) {
25034            let len = __tmp.len();
25035            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25036        } else {
25037            __tmp.len()
25038        }
25039    }
25040}
25041#[doc = "id: 28"]
25042#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
25043#[derive(Debug, Clone, PartialEq)]
25044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25045#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25046pub struct RAW_PRESSURE_DATA {
25047    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25048    pub time_usec: u64,
25049    #[doc = "Absolute pressure (raw)"]
25050    pub press_abs: i16,
25051    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25052    pub press_diff1: i16,
25053    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25054    pub press_diff2: i16,
25055    #[doc = "Raw Temperature measurement (raw)"]
25056    pub temperature: i16,
25057}
25058impl RAW_PRESSURE_DATA {
25059    pub const ENCODED_LEN: usize = 16usize;
25060    pub const DEFAULT: Self = Self {
25061        time_usec: 0_u64,
25062        press_abs: 0_i16,
25063        press_diff1: 0_i16,
25064        press_diff2: 0_i16,
25065        temperature: 0_i16,
25066    };
25067    #[cfg(feature = "arbitrary")]
25068    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25069        use arbitrary::{Arbitrary, Unstructured};
25070        let mut buf = [0u8; 1024];
25071        rng.fill_bytes(&mut buf);
25072        let mut unstructured = Unstructured::new(&buf);
25073        Self::arbitrary(&mut unstructured).unwrap_or_default()
25074    }
25075}
25076impl Default for RAW_PRESSURE_DATA {
25077    fn default() -> Self {
25078        Self::DEFAULT.clone()
25079    }
25080}
25081impl MessageData for RAW_PRESSURE_DATA {
25082    type Message = MavMessage;
25083    const ID: u32 = 28u32;
25084    const NAME: &'static str = "RAW_PRESSURE";
25085    const EXTRA_CRC: u8 = 67u8;
25086    const ENCODED_LEN: usize = 16usize;
25087    fn deser(
25088        _version: MavlinkVersion,
25089        __input: &[u8],
25090    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25091        let avail_len = __input.len();
25092        let mut payload_buf = [0; Self::ENCODED_LEN];
25093        let mut buf = if avail_len < Self::ENCODED_LEN {
25094            payload_buf[0..avail_len].copy_from_slice(__input);
25095            Bytes::new(&payload_buf)
25096        } else {
25097            Bytes::new(__input)
25098        };
25099        let mut __struct = Self::default();
25100        __struct.time_usec = buf.get_u64_le();
25101        __struct.press_abs = buf.get_i16_le();
25102        __struct.press_diff1 = buf.get_i16_le();
25103        __struct.press_diff2 = buf.get_i16_le();
25104        __struct.temperature = buf.get_i16_le();
25105        Ok(__struct)
25106    }
25107    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25108        let mut __tmp = BytesMut::new(bytes);
25109        #[allow(clippy::absurd_extreme_comparisons)]
25110        #[allow(unused_comparisons)]
25111        if __tmp.remaining() < Self::ENCODED_LEN {
25112            panic!(
25113                "buffer is too small (need {} bytes, but got {})",
25114                Self::ENCODED_LEN,
25115                __tmp.remaining(),
25116            )
25117        }
25118        __tmp.put_u64_le(self.time_usec);
25119        __tmp.put_i16_le(self.press_abs);
25120        __tmp.put_i16_le(self.press_diff1);
25121        __tmp.put_i16_le(self.press_diff2);
25122        __tmp.put_i16_le(self.temperature);
25123        if matches!(version, MavlinkVersion::V2) {
25124            let len = __tmp.len();
25125            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25126        } else {
25127            __tmp.len()
25128        }
25129    }
25130}
25131#[doc = "id: 339"]
25132#[doc = "RPM sensor data message."]
25133#[derive(Debug, Clone, PartialEq)]
25134#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25135#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25136pub struct RAW_RPM_DATA {
25137    #[doc = "Indicated rate"]
25138    pub frequency: f32,
25139    #[doc = "Index of this RPM sensor (0-indexed)"]
25140    pub index: u8,
25141}
25142impl RAW_RPM_DATA {
25143    pub const ENCODED_LEN: usize = 5usize;
25144    pub const DEFAULT: Self = Self {
25145        frequency: 0.0_f32,
25146        index: 0_u8,
25147    };
25148    #[cfg(feature = "arbitrary")]
25149    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25150        use arbitrary::{Arbitrary, Unstructured};
25151        let mut buf = [0u8; 1024];
25152        rng.fill_bytes(&mut buf);
25153        let mut unstructured = Unstructured::new(&buf);
25154        Self::arbitrary(&mut unstructured).unwrap_or_default()
25155    }
25156}
25157impl Default for RAW_RPM_DATA {
25158    fn default() -> Self {
25159        Self::DEFAULT.clone()
25160    }
25161}
25162impl MessageData for RAW_RPM_DATA {
25163    type Message = MavMessage;
25164    const ID: u32 = 339u32;
25165    const NAME: &'static str = "RAW_RPM";
25166    const EXTRA_CRC: u8 = 199u8;
25167    const ENCODED_LEN: usize = 5usize;
25168    fn deser(
25169        _version: MavlinkVersion,
25170        __input: &[u8],
25171    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25172        let avail_len = __input.len();
25173        let mut payload_buf = [0; Self::ENCODED_LEN];
25174        let mut buf = if avail_len < Self::ENCODED_LEN {
25175            payload_buf[0..avail_len].copy_from_slice(__input);
25176            Bytes::new(&payload_buf)
25177        } else {
25178            Bytes::new(__input)
25179        };
25180        let mut __struct = Self::default();
25181        __struct.frequency = buf.get_f32_le();
25182        __struct.index = buf.get_u8();
25183        Ok(__struct)
25184    }
25185    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25186        let mut __tmp = BytesMut::new(bytes);
25187        #[allow(clippy::absurd_extreme_comparisons)]
25188        #[allow(unused_comparisons)]
25189        if __tmp.remaining() < Self::ENCODED_LEN {
25190            panic!(
25191                "buffer is too small (need {} bytes, but got {})",
25192                Self::ENCODED_LEN,
25193                __tmp.remaining(),
25194            )
25195        }
25196        __tmp.put_f32_le(self.frequency);
25197        __tmp.put_u8(self.index);
25198        if matches!(version, MavlinkVersion::V2) {
25199            let len = __tmp.len();
25200            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25201        } else {
25202            __tmp.len()
25203        }
25204    }
25205}
25206#[doc = "id: 65"]
25207#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25208#[derive(Debug, Clone, PartialEq)]
25209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25211pub struct RC_CHANNELS_DATA {
25212    #[doc = "Timestamp (time since system boot)."]
25213    pub time_boot_ms: u32,
25214    #[doc = "RC channel 1 value."]
25215    pub chan1_raw: u16,
25216    #[doc = "RC channel 2 value."]
25217    pub chan2_raw: u16,
25218    #[doc = "RC channel 3 value."]
25219    pub chan3_raw: u16,
25220    #[doc = "RC channel 4 value."]
25221    pub chan4_raw: u16,
25222    #[doc = "RC channel 5 value."]
25223    pub chan5_raw: u16,
25224    #[doc = "RC channel 6 value."]
25225    pub chan6_raw: u16,
25226    #[doc = "RC channel 7 value."]
25227    pub chan7_raw: u16,
25228    #[doc = "RC channel 8 value."]
25229    pub chan8_raw: u16,
25230    #[doc = "RC channel 9 value."]
25231    pub chan9_raw: u16,
25232    #[doc = "RC channel 10 value."]
25233    pub chan10_raw: u16,
25234    #[doc = "RC channel 11 value."]
25235    pub chan11_raw: u16,
25236    #[doc = "RC channel 12 value."]
25237    pub chan12_raw: u16,
25238    #[doc = "RC channel 13 value."]
25239    pub chan13_raw: u16,
25240    #[doc = "RC channel 14 value."]
25241    pub chan14_raw: u16,
25242    #[doc = "RC channel 15 value."]
25243    pub chan15_raw: u16,
25244    #[doc = "RC channel 16 value."]
25245    pub chan16_raw: u16,
25246    #[doc = "RC channel 17 value."]
25247    pub chan17_raw: u16,
25248    #[doc = "RC channel 18 value."]
25249    pub chan18_raw: u16,
25250    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25251    pub chancount: u8,
25252    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25253    pub rssi: u8,
25254}
25255impl RC_CHANNELS_DATA {
25256    pub const ENCODED_LEN: usize = 42usize;
25257    pub const DEFAULT: Self = Self {
25258        time_boot_ms: 0_u32,
25259        chan1_raw: 0_u16,
25260        chan2_raw: 0_u16,
25261        chan3_raw: 0_u16,
25262        chan4_raw: 0_u16,
25263        chan5_raw: 0_u16,
25264        chan6_raw: 0_u16,
25265        chan7_raw: 0_u16,
25266        chan8_raw: 0_u16,
25267        chan9_raw: 0_u16,
25268        chan10_raw: 0_u16,
25269        chan11_raw: 0_u16,
25270        chan12_raw: 0_u16,
25271        chan13_raw: 0_u16,
25272        chan14_raw: 0_u16,
25273        chan15_raw: 0_u16,
25274        chan16_raw: 0_u16,
25275        chan17_raw: 0_u16,
25276        chan18_raw: 0_u16,
25277        chancount: 0_u8,
25278        rssi: 0_u8,
25279    };
25280    #[cfg(feature = "arbitrary")]
25281    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25282        use arbitrary::{Arbitrary, Unstructured};
25283        let mut buf = [0u8; 1024];
25284        rng.fill_bytes(&mut buf);
25285        let mut unstructured = Unstructured::new(&buf);
25286        Self::arbitrary(&mut unstructured).unwrap_or_default()
25287    }
25288}
25289impl Default for RC_CHANNELS_DATA {
25290    fn default() -> Self {
25291        Self::DEFAULT.clone()
25292    }
25293}
25294impl MessageData for RC_CHANNELS_DATA {
25295    type Message = MavMessage;
25296    const ID: u32 = 65u32;
25297    const NAME: &'static str = "RC_CHANNELS";
25298    const EXTRA_CRC: u8 = 118u8;
25299    const ENCODED_LEN: usize = 42usize;
25300    fn deser(
25301        _version: MavlinkVersion,
25302        __input: &[u8],
25303    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25304        let avail_len = __input.len();
25305        let mut payload_buf = [0; Self::ENCODED_LEN];
25306        let mut buf = if avail_len < Self::ENCODED_LEN {
25307            payload_buf[0..avail_len].copy_from_slice(__input);
25308            Bytes::new(&payload_buf)
25309        } else {
25310            Bytes::new(__input)
25311        };
25312        let mut __struct = Self::default();
25313        __struct.time_boot_ms = buf.get_u32_le();
25314        __struct.chan1_raw = buf.get_u16_le();
25315        __struct.chan2_raw = buf.get_u16_le();
25316        __struct.chan3_raw = buf.get_u16_le();
25317        __struct.chan4_raw = buf.get_u16_le();
25318        __struct.chan5_raw = buf.get_u16_le();
25319        __struct.chan6_raw = buf.get_u16_le();
25320        __struct.chan7_raw = buf.get_u16_le();
25321        __struct.chan8_raw = buf.get_u16_le();
25322        __struct.chan9_raw = buf.get_u16_le();
25323        __struct.chan10_raw = buf.get_u16_le();
25324        __struct.chan11_raw = buf.get_u16_le();
25325        __struct.chan12_raw = buf.get_u16_le();
25326        __struct.chan13_raw = buf.get_u16_le();
25327        __struct.chan14_raw = buf.get_u16_le();
25328        __struct.chan15_raw = buf.get_u16_le();
25329        __struct.chan16_raw = buf.get_u16_le();
25330        __struct.chan17_raw = buf.get_u16_le();
25331        __struct.chan18_raw = buf.get_u16_le();
25332        __struct.chancount = buf.get_u8();
25333        __struct.rssi = buf.get_u8();
25334        Ok(__struct)
25335    }
25336    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25337        let mut __tmp = BytesMut::new(bytes);
25338        #[allow(clippy::absurd_extreme_comparisons)]
25339        #[allow(unused_comparisons)]
25340        if __tmp.remaining() < Self::ENCODED_LEN {
25341            panic!(
25342                "buffer is too small (need {} bytes, but got {})",
25343                Self::ENCODED_LEN,
25344                __tmp.remaining(),
25345            )
25346        }
25347        __tmp.put_u32_le(self.time_boot_ms);
25348        __tmp.put_u16_le(self.chan1_raw);
25349        __tmp.put_u16_le(self.chan2_raw);
25350        __tmp.put_u16_le(self.chan3_raw);
25351        __tmp.put_u16_le(self.chan4_raw);
25352        __tmp.put_u16_le(self.chan5_raw);
25353        __tmp.put_u16_le(self.chan6_raw);
25354        __tmp.put_u16_le(self.chan7_raw);
25355        __tmp.put_u16_le(self.chan8_raw);
25356        __tmp.put_u16_le(self.chan9_raw);
25357        __tmp.put_u16_le(self.chan10_raw);
25358        __tmp.put_u16_le(self.chan11_raw);
25359        __tmp.put_u16_le(self.chan12_raw);
25360        __tmp.put_u16_le(self.chan13_raw);
25361        __tmp.put_u16_le(self.chan14_raw);
25362        __tmp.put_u16_le(self.chan15_raw);
25363        __tmp.put_u16_le(self.chan16_raw);
25364        __tmp.put_u16_le(self.chan17_raw);
25365        __tmp.put_u16_le(self.chan18_raw);
25366        __tmp.put_u8(self.chancount);
25367        __tmp.put_u8(self.rssi);
25368        if matches!(version, MavlinkVersion::V2) {
25369            let len = __tmp.len();
25370            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25371        } else {
25372            __tmp.len()
25373        }
25374    }
25375}
25376#[doc = "id: 70"]
25377#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25378#[derive(Debug, Clone, PartialEq)]
25379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25381pub struct RC_CHANNELS_OVERRIDE_DATA {
25382    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25383    pub chan1_raw: u16,
25384    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25385    pub chan2_raw: u16,
25386    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25387    pub chan3_raw: u16,
25388    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25389    pub chan4_raw: u16,
25390    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25391    pub chan5_raw: u16,
25392    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25393    pub chan6_raw: u16,
25394    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25395    pub chan7_raw: u16,
25396    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25397    pub chan8_raw: u16,
25398    #[doc = "System ID"]
25399    pub target_system: u8,
25400    #[doc = "Component ID"]
25401    pub target_component: u8,
25402    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25403    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25404    pub chan9_raw: u16,
25405    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25406    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25407    pub chan10_raw: u16,
25408    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25409    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25410    pub chan11_raw: u16,
25411    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25412    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25413    pub chan12_raw: u16,
25414    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25415    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25416    pub chan13_raw: u16,
25417    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25418    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25419    pub chan14_raw: u16,
25420    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25421    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25422    pub chan15_raw: u16,
25423    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25424    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25425    pub chan16_raw: u16,
25426    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25427    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25428    pub chan17_raw: u16,
25429    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25430    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25431    pub chan18_raw: u16,
25432}
25433impl RC_CHANNELS_OVERRIDE_DATA {
25434    pub const ENCODED_LEN: usize = 38usize;
25435    pub const DEFAULT: Self = Self {
25436        chan1_raw: 0_u16,
25437        chan2_raw: 0_u16,
25438        chan3_raw: 0_u16,
25439        chan4_raw: 0_u16,
25440        chan5_raw: 0_u16,
25441        chan6_raw: 0_u16,
25442        chan7_raw: 0_u16,
25443        chan8_raw: 0_u16,
25444        target_system: 0_u8,
25445        target_component: 0_u8,
25446        chan9_raw: 0_u16,
25447        chan10_raw: 0_u16,
25448        chan11_raw: 0_u16,
25449        chan12_raw: 0_u16,
25450        chan13_raw: 0_u16,
25451        chan14_raw: 0_u16,
25452        chan15_raw: 0_u16,
25453        chan16_raw: 0_u16,
25454        chan17_raw: 0_u16,
25455        chan18_raw: 0_u16,
25456    };
25457    #[cfg(feature = "arbitrary")]
25458    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25459        use arbitrary::{Arbitrary, Unstructured};
25460        let mut buf = [0u8; 1024];
25461        rng.fill_bytes(&mut buf);
25462        let mut unstructured = Unstructured::new(&buf);
25463        Self::arbitrary(&mut unstructured).unwrap_or_default()
25464    }
25465}
25466impl Default for RC_CHANNELS_OVERRIDE_DATA {
25467    fn default() -> Self {
25468        Self::DEFAULT.clone()
25469    }
25470}
25471impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25472    type Message = MavMessage;
25473    const ID: u32 = 70u32;
25474    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25475    const EXTRA_CRC: u8 = 124u8;
25476    const ENCODED_LEN: usize = 38usize;
25477    fn deser(
25478        _version: MavlinkVersion,
25479        __input: &[u8],
25480    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25481        let avail_len = __input.len();
25482        let mut payload_buf = [0; Self::ENCODED_LEN];
25483        let mut buf = if avail_len < Self::ENCODED_LEN {
25484            payload_buf[0..avail_len].copy_from_slice(__input);
25485            Bytes::new(&payload_buf)
25486        } else {
25487            Bytes::new(__input)
25488        };
25489        let mut __struct = Self::default();
25490        __struct.chan1_raw = buf.get_u16_le();
25491        __struct.chan2_raw = buf.get_u16_le();
25492        __struct.chan3_raw = buf.get_u16_le();
25493        __struct.chan4_raw = buf.get_u16_le();
25494        __struct.chan5_raw = buf.get_u16_le();
25495        __struct.chan6_raw = buf.get_u16_le();
25496        __struct.chan7_raw = buf.get_u16_le();
25497        __struct.chan8_raw = buf.get_u16_le();
25498        __struct.target_system = buf.get_u8();
25499        __struct.target_component = buf.get_u8();
25500        __struct.chan9_raw = buf.get_u16_le();
25501        __struct.chan10_raw = buf.get_u16_le();
25502        __struct.chan11_raw = buf.get_u16_le();
25503        __struct.chan12_raw = buf.get_u16_le();
25504        __struct.chan13_raw = buf.get_u16_le();
25505        __struct.chan14_raw = buf.get_u16_le();
25506        __struct.chan15_raw = buf.get_u16_le();
25507        __struct.chan16_raw = buf.get_u16_le();
25508        __struct.chan17_raw = buf.get_u16_le();
25509        __struct.chan18_raw = buf.get_u16_le();
25510        Ok(__struct)
25511    }
25512    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25513        let mut __tmp = BytesMut::new(bytes);
25514        #[allow(clippy::absurd_extreme_comparisons)]
25515        #[allow(unused_comparisons)]
25516        if __tmp.remaining() < Self::ENCODED_LEN {
25517            panic!(
25518                "buffer is too small (need {} bytes, but got {})",
25519                Self::ENCODED_LEN,
25520                __tmp.remaining(),
25521            )
25522        }
25523        __tmp.put_u16_le(self.chan1_raw);
25524        __tmp.put_u16_le(self.chan2_raw);
25525        __tmp.put_u16_le(self.chan3_raw);
25526        __tmp.put_u16_le(self.chan4_raw);
25527        __tmp.put_u16_le(self.chan5_raw);
25528        __tmp.put_u16_le(self.chan6_raw);
25529        __tmp.put_u16_le(self.chan7_raw);
25530        __tmp.put_u16_le(self.chan8_raw);
25531        __tmp.put_u8(self.target_system);
25532        __tmp.put_u8(self.target_component);
25533        __tmp.put_u16_le(self.chan9_raw);
25534        __tmp.put_u16_le(self.chan10_raw);
25535        __tmp.put_u16_le(self.chan11_raw);
25536        __tmp.put_u16_le(self.chan12_raw);
25537        __tmp.put_u16_le(self.chan13_raw);
25538        __tmp.put_u16_le(self.chan14_raw);
25539        __tmp.put_u16_le(self.chan15_raw);
25540        __tmp.put_u16_le(self.chan16_raw);
25541        __tmp.put_u16_le(self.chan17_raw);
25542        __tmp.put_u16_le(self.chan18_raw);
25543        if matches!(version, MavlinkVersion::V2) {
25544            let len = __tmp.len();
25545            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25546        } else {
25547            __tmp.len()
25548        }
25549    }
25550}
25551#[doc = "id: 35"]
25552#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25553#[derive(Debug, Clone, PartialEq)]
25554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25555#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25556pub struct RC_CHANNELS_RAW_DATA {
25557    #[doc = "Timestamp (time since system boot)."]
25558    pub time_boot_ms: u32,
25559    #[doc = "RC channel 1 value."]
25560    pub chan1_raw: u16,
25561    #[doc = "RC channel 2 value."]
25562    pub chan2_raw: u16,
25563    #[doc = "RC channel 3 value."]
25564    pub chan3_raw: u16,
25565    #[doc = "RC channel 4 value."]
25566    pub chan4_raw: u16,
25567    #[doc = "RC channel 5 value."]
25568    pub chan5_raw: u16,
25569    #[doc = "RC channel 6 value."]
25570    pub chan6_raw: u16,
25571    #[doc = "RC channel 7 value."]
25572    pub chan7_raw: u16,
25573    #[doc = "RC channel 8 value."]
25574    pub chan8_raw: u16,
25575    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25576    pub port: u8,
25577    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25578    pub rssi: u8,
25579}
25580impl RC_CHANNELS_RAW_DATA {
25581    pub const ENCODED_LEN: usize = 22usize;
25582    pub const DEFAULT: Self = Self {
25583        time_boot_ms: 0_u32,
25584        chan1_raw: 0_u16,
25585        chan2_raw: 0_u16,
25586        chan3_raw: 0_u16,
25587        chan4_raw: 0_u16,
25588        chan5_raw: 0_u16,
25589        chan6_raw: 0_u16,
25590        chan7_raw: 0_u16,
25591        chan8_raw: 0_u16,
25592        port: 0_u8,
25593        rssi: 0_u8,
25594    };
25595    #[cfg(feature = "arbitrary")]
25596    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25597        use arbitrary::{Arbitrary, Unstructured};
25598        let mut buf = [0u8; 1024];
25599        rng.fill_bytes(&mut buf);
25600        let mut unstructured = Unstructured::new(&buf);
25601        Self::arbitrary(&mut unstructured).unwrap_or_default()
25602    }
25603}
25604impl Default for RC_CHANNELS_RAW_DATA {
25605    fn default() -> Self {
25606        Self::DEFAULT.clone()
25607    }
25608}
25609impl MessageData for RC_CHANNELS_RAW_DATA {
25610    type Message = MavMessage;
25611    const ID: u32 = 35u32;
25612    const NAME: &'static str = "RC_CHANNELS_RAW";
25613    const EXTRA_CRC: u8 = 244u8;
25614    const ENCODED_LEN: usize = 22usize;
25615    fn deser(
25616        _version: MavlinkVersion,
25617        __input: &[u8],
25618    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25619        let avail_len = __input.len();
25620        let mut payload_buf = [0; Self::ENCODED_LEN];
25621        let mut buf = if avail_len < Self::ENCODED_LEN {
25622            payload_buf[0..avail_len].copy_from_slice(__input);
25623            Bytes::new(&payload_buf)
25624        } else {
25625            Bytes::new(__input)
25626        };
25627        let mut __struct = Self::default();
25628        __struct.time_boot_ms = buf.get_u32_le();
25629        __struct.chan1_raw = buf.get_u16_le();
25630        __struct.chan2_raw = buf.get_u16_le();
25631        __struct.chan3_raw = buf.get_u16_le();
25632        __struct.chan4_raw = buf.get_u16_le();
25633        __struct.chan5_raw = buf.get_u16_le();
25634        __struct.chan6_raw = buf.get_u16_le();
25635        __struct.chan7_raw = buf.get_u16_le();
25636        __struct.chan8_raw = buf.get_u16_le();
25637        __struct.port = buf.get_u8();
25638        __struct.rssi = buf.get_u8();
25639        Ok(__struct)
25640    }
25641    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25642        let mut __tmp = BytesMut::new(bytes);
25643        #[allow(clippy::absurd_extreme_comparisons)]
25644        #[allow(unused_comparisons)]
25645        if __tmp.remaining() < Self::ENCODED_LEN {
25646            panic!(
25647                "buffer is too small (need {} bytes, but got {})",
25648                Self::ENCODED_LEN,
25649                __tmp.remaining(),
25650            )
25651        }
25652        __tmp.put_u32_le(self.time_boot_ms);
25653        __tmp.put_u16_le(self.chan1_raw);
25654        __tmp.put_u16_le(self.chan2_raw);
25655        __tmp.put_u16_le(self.chan3_raw);
25656        __tmp.put_u16_le(self.chan4_raw);
25657        __tmp.put_u16_le(self.chan5_raw);
25658        __tmp.put_u16_le(self.chan6_raw);
25659        __tmp.put_u16_le(self.chan7_raw);
25660        __tmp.put_u16_le(self.chan8_raw);
25661        __tmp.put_u8(self.port);
25662        __tmp.put_u8(self.rssi);
25663        if matches!(version, MavlinkVersion::V2) {
25664            let len = __tmp.len();
25665            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25666        } else {
25667            __tmp.len()
25668        }
25669    }
25670}
25671#[doc = "id: 34"]
25672#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
25673#[derive(Debug, Clone, PartialEq)]
25674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25676pub struct RC_CHANNELS_SCALED_DATA {
25677    #[doc = "Timestamp (time since system boot)."]
25678    pub time_boot_ms: u32,
25679    #[doc = "RC channel 1 value scaled."]
25680    pub chan1_scaled: i16,
25681    #[doc = "RC channel 2 value scaled."]
25682    pub chan2_scaled: i16,
25683    #[doc = "RC channel 3 value scaled."]
25684    pub chan3_scaled: i16,
25685    #[doc = "RC channel 4 value scaled."]
25686    pub chan4_scaled: i16,
25687    #[doc = "RC channel 5 value scaled."]
25688    pub chan5_scaled: i16,
25689    #[doc = "RC channel 6 value scaled."]
25690    pub chan6_scaled: i16,
25691    #[doc = "RC channel 7 value scaled."]
25692    pub chan7_scaled: i16,
25693    #[doc = "RC channel 8 value scaled."]
25694    pub chan8_scaled: i16,
25695    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25696    pub port: u8,
25697    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25698    pub rssi: u8,
25699}
25700impl RC_CHANNELS_SCALED_DATA {
25701    pub const ENCODED_LEN: usize = 22usize;
25702    pub const DEFAULT: Self = Self {
25703        time_boot_ms: 0_u32,
25704        chan1_scaled: 0_i16,
25705        chan2_scaled: 0_i16,
25706        chan3_scaled: 0_i16,
25707        chan4_scaled: 0_i16,
25708        chan5_scaled: 0_i16,
25709        chan6_scaled: 0_i16,
25710        chan7_scaled: 0_i16,
25711        chan8_scaled: 0_i16,
25712        port: 0_u8,
25713        rssi: 0_u8,
25714    };
25715    #[cfg(feature = "arbitrary")]
25716    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25717        use arbitrary::{Arbitrary, Unstructured};
25718        let mut buf = [0u8; 1024];
25719        rng.fill_bytes(&mut buf);
25720        let mut unstructured = Unstructured::new(&buf);
25721        Self::arbitrary(&mut unstructured).unwrap_or_default()
25722    }
25723}
25724impl Default for RC_CHANNELS_SCALED_DATA {
25725    fn default() -> Self {
25726        Self::DEFAULT.clone()
25727    }
25728}
25729impl MessageData for RC_CHANNELS_SCALED_DATA {
25730    type Message = MavMessage;
25731    const ID: u32 = 34u32;
25732    const NAME: &'static str = "RC_CHANNELS_SCALED";
25733    const EXTRA_CRC: u8 = 237u8;
25734    const ENCODED_LEN: usize = 22usize;
25735    fn deser(
25736        _version: MavlinkVersion,
25737        __input: &[u8],
25738    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25739        let avail_len = __input.len();
25740        let mut payload_buf = [0; Self::ENCODED_LEN];
25741        let mut buf = if avail_len < Self::ENCODED_LEN {
25742            payload_buf[0..avail_len].copy_from_slice(__input);
25743            Bytes::new(&payload_buf)
25744        } else {
25745            Bytes::new(__input)
25746        };
25747        let mut __struct = Self::default();
25748        __struct.time_boot_ms = buf.get_u32_le();
25749        __struct.chan1_scaled = buf.get_i16_le();
25750        __struct.chan2_scaled = buf.get_i16_le();
25751        __struct.chan3_scaled = buf.get_i16_le();
25752        __struct.chan4_scaled = buf.get_i16_le();
25753        __struct.chan5_scaled = buf.get_i16_le();
25754        __struct.chan6_scaled = buf.get_i16_le();
25755        __struct.chan7_scaled = buf.get_i16_le();
25756        __struct.chan8_scaled = buf.get_i16_le();
25757        __struct.port = buf.get_u8();
25758        __struct.rssi = buf.get_u8();
25759        Ok(__struct)
25760    }
25761    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25762        let mut __tmp = BytesMut::new(bytes);
25763        #[allow(clippy::absurd_extreme_comparisons)]
25764        #[allow(unused_comparisons)]
25765        if __tmp.remaining() < Self::ENCODED_LEN {
25766            panic!(
25767                "buffer is too small (need {} bytes, but got {})",
25768                Self::ENCODED_LEN,
25769                __tmp.remaining(),
25770            )
25771        }
25772        __tmp.put_u32_le(self.time_boot_ms);
25773        __tmp.put_i16_le(self.chan1_scaled);
25774        __tmp.put_i16_le(self.chan2_scaled);
25775        __tmp.put_i16_le(self.chan3_scaled);
25776        __tmp.put_i16_le(self.chan4_scaled);
25777        __tmp.put_i16_le(self.chan5_scaled);
25778        __tmp.put_i16_le(self.chan6_scaled);
25779        __tmp.put_i16_le(self.chan7_scaled);
25780        __tmp.put_i16_le(self.chan8_scaled);
25781        __tmp.put_u8(self.port);
25782        __tmp.put_u8(self.rssi);
25783        if matches!(version, MavlinkVersion::V2) {
25784            let len = __tmp.len();
25785            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25786        } else {
25787            __tmp.len()
25788        }
25789    }
25790}
25791#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
25792#[doc = "id: 66"]
25793#[doc = "Request a data stream."]
25794#[derive(Debug, Clone, PartialEq)]
25795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25796#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25797pub struct REQUEST_DATA_STREAM_DATA {
25798    #[doc = "The requested message rate"]
25799    pub req_message_rate: u16,
25800    #[doc = "The target requested to send the message stream."]
25801    pub target_system: u8,
25802    #[doc = "The target requested to send the message stream."]
25803    pub target_component: u8,
25804    #[doc = "The ID of the requested data stream"]
25805    pub req_stream_id: u8,
25806    #[doc = "1 to start sending, 0 to stop sending."]
25807    pub start_stop: u8,
25808}
25809impl REQUEST_DATA_STREAM_DATA {
25810    pub const ENCODED_LEN: usize = 6usize;
25811    pub const DEFAULT: Self = Self {
25812        req_message_rate: 0_u16,
25813        target_system: 0_u8,
25814        target_component: 0_u8,
25815        req_stream_id: 0_u8,
25816        start_stop: 0_u8,
25817    };
25818    #[cfg(feature = "arbitrary")]
25819    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25820        use arbitrary::{Arbitrary, Unstructured};
25821        let mut buf = [0u8; 1024];
25822        rng.fill_bytes(&mut buf);
25823        let mut unstructured = Unstructured::new(&buf);
25824        Self::arbitrary(&mut unstructured).unwrap_or_default()
25825    }
25826}
25827impl Default for REQUEST_DATA_STREAM_DATA {
25828    fn default() -> Self {
25829        Self::DEFAULT.clone()
25830    }
25831}
25832impl MessageData for REQUEST_DATA_STREAM_DATA {
25833    type Message = MavMessage;
25834    const ID: u32 = 66u32;
25835    const NAME: &'static str = "REQUEST_DATA_STREAM";
25836    const EXTRA_CRC: u8 = 148u8;
25837    const ENCODED_LEN: usize = 6usize;
25838    fn deser(
25839        _version: MavlinkVersion,
25840        __input: &[u8],
25841    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25842        let avail_len = __input.len();
25843        let mut payload_buf = [0; Self::ENCODED_LEN];
25844        let mut buf = if avail_len < Self::ENCODED_LEN {
25845            payload_buf[0..avail_len].copy_from_slice(__input);
25846            Bytes::new(&payload_buf)
25847        } else {
25848            Bytes::new(__input)
25849        };
25850        let mut __struct = Self::default();
25851        __struct.req_message_rate = buf.get_u16_le();
25852        __struct.target_system = buf.get_u8();
25853        __struct.target_component = buf.get_u8();
25854        __struct.req_stream_id = buf.get_u8();
25855        __struct.start_stop = buf.get_u8();
25856        Ok(__struct)
25857    }
25858    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25859        let mut __tmp = BytesMut::new(bytes);
25860        #[allow(clippy::absurd_extreme_comparisons)]
25861        #[allow(unused_comparisons)]
25862        if __tmp.remaining() < Self::ENCODED_LEN {
25863            panic!(
25864                "buffer is too small (need {} bytes, but got {})",
25865                Self::ENCODED_LEN,
25866                __tmp.remaining(),
25867            )
25868        }
25869        __tmp.put_u16_le(self.req_message_rate);
25870        __tmp.put_u8(self.target_system);
25871        __tmp.put_u8(self.target_component);
25872        __tmp.put_u8(self.req_stream_id);
25873        __tmp.put_u8(self.start_stop);
25874        if matches!(version, MavlinkVersion::V2) {
25875            let len = __tmp.len();
25876            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25877        } else {
25878            __tmp.len()
25879        }
25880    }
25881}
25882#[doc = "id: 412"]
25883#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
25884#[derive(Debug, Clone, PartialEq)]
25885#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25886#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25887pub struct REQUEST_EVENT_DATA {
25888    #[doc = "First sequence number of the requested event."]
25889    pub first_sequence: u16,
25890    #[doc = "Last sequence number of the requested event."]
25891    pub last_sequence: u16,
25892    #[doc = "System ID"]
25893    pub target_system: u8,
25894    #[doc = "Component ID"]
25895    pub target_component: u8,
25896}
25897impl REQUEST_EVENT_DATA {
25898    pub const ENCODED_LEN: usize = 6usize;
25899    pub const DEFAULT: Self = Self {
25900        first_sequence: 0_u16,
25901        last_sequence: 0_u16,
25902        target_system: 0_u8,
25903        target_component: 0_u8,
25904    };
25905    #[cfg(feature = "arbitrary")]
25906    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25907        use arbitrary::{Arbitrary, Unstructured};
25908        let mut buf = [0u8; 1024];
25909        rng.fill_bytes(&mut buf);
25910        let mut unstructured = Unstructured::new(&buf);
25911        Self::arbitrary(&mut unstructured).unwrap_or_default()
25912    }
25913}
25914impl Default for REQUEST_EVENT_DATA {
25915    fn default() -> Self {
25916        Self::DEFAULT.clone()
25917    }
25918}
25919impl MessageData for REQUEST_EVENT_DATA {
25920    type Message = MavMessage;
25921    const ID: u32 = 412u32;
25922    const NAME: &'static str = "REQUEST_EVENT";
25923    const EXTRA_CRC: u8 = 33u8;
25924    const ENCODED_LEN: usize = 6usize;
25925    fn deser(
25926        _version: MavlinkVersion,
25927        __input: &[u8],
25928    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25929        let avail_len = __input.len();
25930        let mut payload_buf = [0; Self::ENCODED_LEN];
25931        let mut buf = if avail_len < Self::ENCODED_LEN {
25932            payload_buf[0..avail_len].copy_from_slice(__input);
25933            Bytes::new(&payload_buf)
25934        } else {
25935            Bytes::new(__input)
25936        };
25937        let mut __struct = Self::default();
25938        __struct.first_sequence = buf.get_u16_le();
25939        __struct.last_sequence = buf.get_u16_le();
25940        __struct.target_system = buf.get_u8();
25941        __struct.target_component = buf.get_u8();
25942        Ok(__struct)
25943    }
25944    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25945        let mut __tmp = BytesMut::new(bytes);
25946        #[allow(clippy::absurd_extreme_comparisons)]
25947        #[allow(unused_comparisons)]
25948        if __tmp.remaining() < Self::ENCODED_LEN {
25949            panic!(
25950                "buffer is too small (need {} bytes, but got {})",
25951                Self::ENCODED_LEN,
25952                __tmp.remaining(),
25953            )
25954        }
25955        __tmp.put_u16_le(self.first_sequence);
25956        __tmp.put_u16_le(self.last_sequence);
25957        __tmp.put_u8(self.target_system);
25958        __tmp.put_u8(self.target_component);
25959        if matches!(version, MavlinkVersion::V2) {
25960            let len = __tmp.len();
25961            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25962        } else {
25963            __tmp.len()
25964        }
25965    }
25966}
25967#[doc = "id: 142"]
25968#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
25969#[derive(Debug, Clone, PartialEq)]
25970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25971#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25972pub struct RESOURCE_REQUEST_DATA {
25973    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
25974    pub request_id: u8,
25975    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
25976    pub uri_type: u8,
25977    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
25978    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25979    pub uri: [u8; 120],
25980    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
25981    pub transfer_type: u8,
25982    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
25983    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25984    pub storage: [u8; 120],
25985}
25986impl RESOURCE_REQUEST_DATA {
25987    pub const ENCODED_LEN: usize = 243usize;
25988    pub const DEFAULT: Self = Self {
25989        request_id: 0_u8,
25990        uri_type: 0_u8,
25991        uri: [0_u8; 120usize],
25992        transfer_type: 0_u8,
25993        storage: [0_u8; 120usize],
25994    };
25995    #[cfg(feature = "arbitrary")]
25996    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25997        use arbitrary::{Arbitrary, Unstructured};
25998        let mut buf = [0u8; 1024];
25999        rng.fill_bytes(&mut buf);
26000        let mut unstructured = Unstructured::new(&buf);
26001        Self::arbitrary(&mut unstructured).unwrap_or_default()
26002    }
26003}
26004impl Default for RESOURCE_REQUEST_DATA {
26005    fn default() -> Self {
26006        Self::DEFAULT.clone()
26007    }
26008}
26009impl MessageData for RESOURCE_REQUEST_DATA {
26010    type Message = MavMessage;
26011    const ID: u32 = 142u32;
26012    const NAME: &'static str = "RESOURCE_REQUEST";
26013    const EXTRA_CRC: u8 = 72u8;
26014    const ENCODED_LEN: usize = 243usize;
26015    fn deser(
26016        _version: MavlinkVersion,
26017        __input: &[u8],
26018    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26019        let avail_len = __input.len();
26020        let mut payload_buf = [0; Self::ENCODED_LEN];
26021        let mut buf = if avail_len < Self::ENCODED_LEN {
26022            payload_buf[0..avail_len].copy_from_slice(__input);
26023            Bytes::new(&payload_buf)
26024        } else {
26025            Bytes::new(__input)
26026        };
26027        let mut __struct = Self::default();
26028        __struct.request_id = buf.get_u8();
26029        __struct.uri_type = buf.get_u8();
26030        for v in &mut __struct.uri {
26031            let val = buf.get_u8();
26032            *v = val;
26033        }
26034        __struct.transfer_type = buf.get_u8();
26035        for v in &mut __struct.storage {
26036            let val = buf.get_u8();
26037            *v = val;
26038        }
26039        Ok(__struct)
26040    }
26041    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26042        let mut __tmp = BytesMut::new(bytes);
26043        #[allow(clippy::absurd_extreme_comparisons)]
26044        #[allow(unused_comparisons)]
26045        if __tmp.remaining() < Self::ENCODED_LEN {
26046            panic!(
26047                "buffer is too small (need {} bytes, but got {})",
26048                Self::ENCODED_LEN,
26049                __tmp.remaining(),
26050            )
26051        }
26052        __tmp.put_u8(self.request_id);
26053        __tmp.put_u8(self.uri_type);
26054        for val in &self.uri {
26055            __tmp.put_u8(*val);
26056        }
26057        __tmp.put_u8(self.transfer_type);
26058        for val in &self.storage {
26059            __tmp.put_u8(*val);
26060        }
26061        if matches!(version, MavlinkVersion::V2) {
26062            let len = __tmp.len();
26063            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26064        } else {
26065            __tmp.len()
26066        }
26067    }
26068}
26069#[doc = "id: 413"]
26070#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26071#[derive(Debug, Clone, PartialEq)]
26072#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26073#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26074pub struct RESPONSE_EVENT_ERROR_DATA {
26075    #[doc = "Sequence number."]
26076    pub sequence: u16,
26077    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26078    pub sequence_oldest_available: u16,
26079    #[doc = "System ID"]
26080    pub target_system: u8,
26081    #[doc = "Component ID"]
26082    pub target_component: u8,
26083    #[doc = "Error reason."]
26084    pub reason: MavEventErrorReason,
26085}
26086impl RESPONSE_EVENT_ERROR_DATA {
26087    pub const ENCODED_LEN: usize = 7usize;
26088    pub const DEFAULT: Self = Self {
26089        sequence: 0_u16,
26090        sequence_oldest_available: 0_u16,
26091        target_system: 0_u8,
26092        target_component: 0_u8,
26093        reason: MavEventErrorReason::DEFAULT,
26094    };
26095    #[cfg(feature = "arbitrary")]
26096    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26097        use arbitrary::{Arbitrary, Unstructured};
26098        let mut buf = [0u8; 1024];
26099        rng.fill_bytes(&mut buf);
26100        let mut unstructured = Unstructured::new(&buf);
26101        Self::arbitrary(&mut unstructured).unwrap_or_default()
26102    }
26103}
26104impl Default for RESPONSE_EVENT_ERROR_DATA {
26105    fn default() -> Self {
26106        Self::DEFAULT.clone()
26107    }
26108}
26109impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26110    type Message = MavMessage;
26111    const ID: u32 = 413u32;
26112    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26113    const EXTRA_CRC: u8 = 77u8;
26114    const ENCODED_LEN: usize = 7usize;
26115    fn deser(
26116        _version: MavlinkVersion,
26117        __input: &[u8],
26118    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26119        let avail_len = __input.len();
26120        let mut payload_buf = [0; Self::ENCODED_LEN];
26121        let mut buf = if avail_len < Self::ENCODED_LEN {
26122            payload_buf[0..avail_len].copy_from_slice(__input);
26123            Bytes::new(&payload_buf)
26124        } else {
26125            Bytes::new(__input)
26126        };
26127        let mut __struct = Self::default();
26128        __struct.sequence = buf.get_u16_le();
26129        __struct.sequence_oldest_available = buf.get_u16_le();
26130        __struct.target_system = buf.get_u8();
26131        __struct.target_component = buf.get_u8();
26132        let tmp = buf.get_u8();
26133        __struct.reason =
26134            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26135                enum_type: "MavEventErrorReason",
26136                value: tmp as u32,
26137            })?;
26138        Ok(__struct)
26139    }
26140    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26141        let mut __tmp = BytesMut::new(bytes);
26142        #[allow(clippy::absurd_extreme_comparisons)]
26143        #[allow(unused_comparisons)]
26144        if __tmp.remaining() < Self::ENCODED_LEN {
26145            panic!(
26146                "buffer is too small (need {} bytes, but got {})",
26147                Self::ENCODED_LEN,
26148                __tmp.remaining(),
26149            )
26150        }
26151        __tmp.put_u16_le(self.sequence);
26152        __tmp.put_u16_le(self.sequence_oldest_available);
26153        __tmp.put_u8(self.target_system);
26154        __tmp.put_u8(self.target_component);
26155        __tmp.put_u8(self.reason as u8);
26156        if matches!(version, MavlinkVersion::V2) {
26157            let len = __tmp.len();
26158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26159        } else {
26160            __tmp.len()
26161        }
26162    }
26163}
26164#[doc = "id: 55"]
26165#[doc = "Read out the safety zone the MAV currently assumes."]
26166#[derive(Debug, Clone, PartialEq)]
26167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26169pub struct SAFETY_ALLOWED_AREA_DATA {
26170    #[doc = "x position 1 / Latitude 1"]
26171    pub p1x: f32,
26172    #[doc = "y position 1 / Longitude 1"]
26173    pub p1y: f32,
26174    #[doc = "z position 1 / Altitude 1"]
26175    pub p1z: f32,
26176    #[doc = "x position 2 / Latitude 2"]
26177    pub p2x: f32,
26178    #[doc = "y position 2 / Longitude 2"]
26179    pub p2y: f32,
26180    #[doc = "z position 2 / Altitude 2"]
26181    pub p2z: f32,
26182    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26183    pub frame: MavFrame,
26184}
26185impl SAFETY_ALLOWED_AREA_DATA {
26186    pub const ENCODED_LEN: usize = 25usize;
26187    pub const DEFAULT: Self = Self {
26188        p1x: 0.0_f32,
26189        p1y: 0.0_f32,
26190        p1z: 0.0_f32,
26191        p2x: 0.0_f32,
26192        p2y: 0.0_f32,
26193        p2z: 0.0_f32,
26194        frame: MavFrame::DEFAULT,
26195    };
26196    #[cfg(feature = "arbitrary")]
26197    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26198        use arbitrary::{Arbitrary, Unstructured};
26199        let mut buf = [0u8; 1024];
26200        rng.fill_bytes(&mut buf);
26201        let mut unstructured = Unstructured::new(&buf);
26202        Self::arbitrary(&mut unstructured).unwrap_or_default()
26203    }
26204}
26205impl Default for SAFETY_ALLOWED_AREA_DATA {
26206    fn default() -> Self {
26207        Self::DEFAULT.clone()
26208    }
26209}
26210impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26211    type Message = MavMessage;
26212    const ID: u32 = 55u32;
26213    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26214    const EXTRA_CRC: u8 = 3u8;
26215    const ENCODED_LEN: usize = 25usize;
26216    fn deser(
26217        _version: MavlinkVersion,
26218        __input: &[u8],
26219    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26220        let avail_len = __input.len();
26221        let mut payload_buf = [0; Self::ENCODED_LEN];
26222        let mut buf = if avail_len < Self::ENCODED_LEN {
26223            payload_buf[0..avail_len].copy_from_slice(__input);
26224            Bytes::new(&payload_buf)
26225        } else {
26226            Bytes::new(__input)
26227        };
26228        let mut __struct = Self::default();
26229        __struct.p1x = buf.get_f32_le();
26230        __struct.p1y = buf.get_f32_le();
26231        __struct.p1z = buf.get_f32_le();
26232        __struct.p2x = buf.get_f32_le();
26233        __struct.p2y = buf.get_f32_le();
26234        __struct.p2z = buf.get_f32_le();
26235        let tmp = buf.get_u8();
26236        __struct.frame =
26237            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26238                enum_type: "MavFrame",
26239                value: tmp as u32,
26240            })?;
26241        Ok(__struct)
26242    }
26243    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26244        let mut __tmp = BytesMut::new(bytes);
26245        #[allow(clippy::absurd_extreme_comparisons)]
26246        #[allow(unused_comparisons)]
26247        if __tmp.remaining() < Self::ENCODED_LEN {
26248            panic!(
26249                "buffer is too small (need {} bytes, but got {})",
26250                Self::ENCODED_LEN,
26251                __tmp.remaining(),
26252            )
26253        }
26254        __tmp.put_f32_le(self.p1x);
26255        __tmp.put_f32_le(self.p1y);
26256        __tmp.put_f32_le(self.p1z);
26257        __tmp.put_f32_le(self.p2x);
26258        __tmp.put_f32_le(self.p2y);
26259        __tmp.put_f32_le(self.p2z);
26260        __tmp.put_u8(self.frame as u8);
26261        if matches!(version, MavlinkVersion::V2) {
26262            let len = __tmp.len();
26263            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26264        } else {
26265            __tmp.len()
26266        }
26267    }
26268}
26269#[doc = "id: 54"]
26270#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26271#[derive(Debug, Clone, PartialEq)]
26272#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26274pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26275    #[doc = "x position 1 / Latitude 1"]
26276    pub p1x: f32,
26277    #[doc = "y position 1 / Longitude 1"]
26278    pub p1y: f32,
26279    #[doc = "z position 1 / Altitude 1"]
26280    pub p1z: f32,
26281    #[doc = "x position 2 / Latitude 2"]
26282    pub p2x: f32,
26283    #[doc = "y position 2 / Longitude 2"]
26284    pub p2y: f32,
26285    #[doc = "z position 2 / Altitude 2"]
26286    pub p2z: f32,
26287    #[doc = "System ID"]
26288    pub target_system: u8,
26289    #[doc = "Component ID"]
26290    pub target_component: u8,
26291    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26292    pub frame: MavFrame,
26293}
26294impl SAFETY_SET_ALLOWED_AREA_DATA {
26295    pub const ENCODED_LEN: usize = 27usize;
26296    pub const DEFAULT: Self = Self {
26297        p1x: 0.0_f32,
26298        p1y: 0.0_f32,
26299        p1z: 0.0_f32,
26300        p2x: 0.0_f32,
26301        p2y: 0.0_f32,
26302        p2z: 0.0_f32,
26303        target_system: 0_u8,
26304        target_component: 0_u8,
26305        frame: MavFrame::DEFAULT,
26306    };
26307    #[cfg(feature = "arbitrary")]
26308    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26309        use arbitrary::{Arbitrary, Unstructured};
26310        let mut buf = [0u8; 1024];
26311        rng.fill_bytes(&mut buf);
26312        let mut unstructured = Unstructured::new(&buf);
26313        Self::arbitrary(&mut unstructured).unwrap_or_default()
26314    }
26315}
26316impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26317    fn default() -> Self {
26318        Self::DEFAULT.clone()
26319    }
26320}
26321impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26322    type Message = MavMessage;
26323    const ID: u32 = 54u32;
26324    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26325    const EXTRA_CRC: u8 = 15u8;
26326    const ENCODED_LEN: usize = 27usize;
26327    fn deser(
26328        _version: MavlinkVersion,
26329        __input: &[u8],
26330    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26331        let avail_len = __input.len();
26332        let mut payload_buf = [0; Self::ENCODED_LEN];
26333        let mut buf = if avail_len < Self::ENCODED_LEN {
26334            payload_buf[0..avail_len].copy_from_slice(__input);
26335            Bytes::new(&payload_buf)
26336        } else {
26337            Bytes::new(__input)
26338        };
26339        let mut __struct = Self::default();
26340        __struct.p1x = buf.get_f32_le();
26341        __struct.p1y = buf.get_f32_le();
26342        __struct.p1z = buf.get_f32_le();
26343        __struct.p2x = buf.get_f32_le();
26344        __struct.p2y = buf.get_f32_le();
26345        __struct.p2z = buf.get_f32_le();
26346        __struct.target_system = buf.get_u8();
26347        __struct.target_component = buf.get_u8();
26348        let tmp = buf.get_u8();
26349        __struct.frame =
26350            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26351                enum_type: "MavFrame",
26352                value: tmp as u32,
26353            })?;
26354        Ok(__struct)
26355    }
26356    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26357        let mut __tmp = BytesMut::new(bytes);
26358        #[allow(clippy::absurd_extreme_comparisons)]
26359        #[allow(unused_comparisons)]
26360        if __tmp.remaining() < Self::ENCODED_LEN {
26361            panic!(
26362                "buffer is too small (need {} bytes, but got {})",
26363                Self::ENCODED_LEN,
26364                __tmp.remaining(),
26365            )
26366        }
26367        __tmp.put_f32_le(self.p1x);
26368        __tmp.put_f32_le(self.p1y);
26369        __tmp.put_f32_le(self.p1z);
26370        __tmp.put_f32_le(self.p2x);
26371        __tmp.put_f32_le(self.p2y);
26372        __tmp.put_f32_le(self.p2z);
26373        __tmp.put_u8(self.target_system);
26374        __tmp.put_u8(self.target_component);
26375        __tmp.put_u8(self.frame as u8);
26376        if matches!(version, MavlinkVersion::V2) {
26377            let len = __tmp.len();
26378            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26379        } else {
26380            __tmp.len()
26381        }
26382    }
26383}
26384#[doc = "id: 26"]
26385#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26386#[derive(Debug, Clone, PartialEq)]
26387#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26388#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26389pub struct SCALED_IMU_DATA {
26390    #[doc = "Timestamp (time since system boot)."]
26391    pub time_boot_ms: u32,
26392    #[doc = "X acceleration"]
26393    pub xacc: i16,
26394    #[doc = "Y acceleration"]
26395    pub yacc: i16,
26396    #[doc = "Z acceleration"]
26397    pub zacc: i16,
26398    #[doc = "Angular speed around X axis"]
26399    pub xgyro: i16,
26400    #[doc = "Angular speed around Y axis"]
26401    pub ygyro: i16,
26402    #[doc = "Angular speed around Z axis"]
26403    pub zgyro: i16,
26404    #[doc = "X Magnetic field"]
26405    pub xmag: i16,
26406    #[doc = "Y Magnetic field"]
26407    pub ymag: i16,
26408    #[doc = "Z Magnetic field"]
26409    pub zmag: i16,
26410    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26411    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26412    pub temperature: i16,
26413}
26414impl SCALED_IMU_DATA {
26415    pub const ENCODED_LEN: usize = 24usize;
26416    pub const DEFAULT: Self = Self {
26417        time_boot_ms: 0_u32,
26418        xacc: 0_i16,
26419        yacc: 0_i16,
26420        zacc: 0_i16,
26421        xgyro: 0_i16,
26422        ygyro: 0_i16,
26423        zgyro: 0_i16,
26424        xmag: 0_i16,
26425        ymag: 0_i16,
26426        zmag: 0_i16,
26427        temperature: 0_i16,
26428    };
26429    #[cfg(feature = "arbitrary")]
26430    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26431        use arbitrary::{Arbitrary, Unstructured};
26432        let mut buf = [0u8; 1024];
26433        rng.fill_bytes(&mut buf);
26434        let mut unstructured = Unstructured::new(&buf);
26435        Self::arbitrary(&mut unstructured).unwrap_or_default()
26436    }
26437}
26438impl Default for SCALED_IMU_DATA {
26439    fn default() -> Self {
26440        Self::DEFAULT.clone()
26441    }
26442}
26443impl MessageData for SCALED_IMU_DATA {
26444    type Message = MavMessage;
26445    const ID: u32 = 26u32;
26446    const NAME: &'static str = "SCALED_IMU";
26447    const EXTRA_CRC: u8 = 170u8;
26448    const ENCODED_LEN: usize = 24usize;
26449    fn deser(
26450        _version: MavlinkVersion,
26451        __input: &[u8],
26452    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26453        let avail_len = __input.len();
26454        let mut payload_buf = [0; Self::ENCODED_LEN];
26455        let mut buf = if avail_len < Self::ENCODED_LEN {
26456            payload_buf[0..avail_len].copy_from_slice(__input);
26457            Bytes::new(&payload_buf)
26458        } else {
26459            Bytes::new(__input)
26460        };
26461        let mut __struct = Self::default();
26462        __struct.time_boot_ms = buf.get_u32_le();
26463        __struct.xacc = buf.get_i16_le();
26464        __struct.yacc = buf.get_i16_le();
26465        __struct.zacc = buf.get_i16_le();
26466        __struct.xgyro = buf.get_i16_le();
26467        __struct.ygyro = buf.get_i16_le();
26468        __struct.zgyro = buf.get_i16_le();
26469        __struct.xmag = buf.get_i16_le();
26470        __struct.ymag = buf.get_i16_le();
26471        __struct.zmag = buf.get_i16_le();
26472        __struct.temperature = buf.get_i16_le();
26473        Ok(__struct)
26474    }
26475    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26476        let mut __tmp = BytesMut::new(bytes);
26477        #[allow(clippy::absurd_extreme_comparisons)]
26478        #[allow(unused_comparisons)]
26479        if __tmp.remaining() < Self::ENCODED_LEN {
26480            panic!(
26481                "buffer is too small (need {} bytes, but got {})",
26482                Self::ENCODED_LEN,
26483                __tmp.remaining(),
26484            )
26485        }
26486        __tmp.put_u32_le(self.time_boot_ms);
26487        __tmp.put_i16_le(self.xacc);
26488        __tmp.put_i16_le(self.yacc);
26489        __tmp.put_i16_le(self.zacc);
26490        __tmp.put_i16_le(self.xgyro);
26491        __tmp.put_i16_le(self.ygyro);
26492        __tmp.put_i16_le(self.zgyro);
26493        __tmp.put_i16_le(self.xmag);
26494        __tmp.put_i16_le(self.ymag);
26495        __tmp.put_i16_le(self.zmag);
26496        __tmp.put_i16_le(self.temperature);
26497        if matches!(version, MavlinkVersion::V2) {
26498            let len = __tmp.len();
26499            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26500        } else {
26501            __tmp.len()
26502        }
26503    }
26504}
26505#[doc = "id: 116"]
26506#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
26507#[derive(Debug, Clone, PartialEq)]
26508#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26509#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26510pub struct SCALED_IMU2_DATA {
26511    #[doc = "Timestamp (time since system boot)."]
26512    pub time_boot_ms: u32,
26513    #[doc = "X acceleration"]
26514    pub xacc: i16,
26515    #[doc = "Y acceleration"]
26516    pub yacc: i16,
26517    #[doc = "Z acceleration"]
26518    pub zacc: i16,
26519    #[doc = "Angular speed around X axis"]
26520    pub xgyro: i16,
26521    #[doc = "Angular speed around Y axis"]
26522    pub ygyro: i16,
26523    #[doc = "Angular speed around Z axis"]
26524    pub zgyro: i16,
26525    #[doc = "X Magnetic field"]
26526    pub xmag: i16,
26527    #[doc = "Y Magnetic field"]
26528    pub ymag: i16,
26529    #[doc = "Z Magnetic field"]
26530    pub zmag: i16,
26531    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26532    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26533    pub temperature: i16,
26534}
26535impl SCALED_IMU2_DATA {
26536    pub const ENCODED_LEN: usize = 24usize;
26537    pub const DEFAULT: Self = Self {
26538        time_boot_ms: 0_u32,
26539        xacc: 0_i16,
26540        yacc: 0_i16,
26541        zacc: 0_i16,
26542        xgyro: 0_i16,
26543        ygyro: 0_i16,
26544        zgyro: 0_i16,
26545        xmag: 0_i16,
26546        ymag: 0_i16,
26547        zmag: 0_i16,
26548        temperature: 0_i16,
26549    };
26550    #[cfg(feature = "arbitrary")]
26551    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26552        use arbitrary::{Arbitrary, Unstructured};
26553        let mut buf = [0u8; 1024];
26554        rng.fill_bytes(&mut buf);
26555        let mut unstructured = Unstructured::new(&buf);
26556        Self::arbitrary(&mut unstructured).unwrap_or_default()
26557    }
26558}
26559impl Default for SCALED_IMU2_DATA {
26560    fn default() -> Self {
26561        Self::DEFAULT.clone()
26562    }
26563}
26564impl MessageData for SCALED_IMU2_DATA {
26565    type Message = MavMessage;
26566    const ID: u32 = 116u32;
26567    const NAME: &'static str = "SCALED_IMU2";
26568    const EXTRA_CRC: u8 = 76u8;
26569    const ENCODED_LEN: usize = 24usize;
26570    fn deser(
26571        _version: MavlinkVersion,
26572        __input: &[u8],
26573    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26574        let avail_len = __input.len();
26575        let mut payload_buf = [0; Self::ENCODED_LEN];
26576        let mut buf = if avail_len < Self::ENCODED_LEN {
26577            payload_buf[0..avail_len].copy_from_slice(__input);
26578            Bytes::new(&payload_buf)
26579        } else {
26580            Bytes::new(__input)
26581        };
26582        let mut __struct = Self::default();
26583        __struct.time_boot_ms = buf.get_u32_le();
26584        __struct.xacc = buf.get_i16_le();
26585        __struct.yacc = buf.get_i16_le();
26586        __struct.zacc = buf.get_i16_le();
26587        __struct.xgyro = buf.get_i16_le();
26588        __struct.ygyro = buf.get_i16_le();
26589        __struct.zgyro = buf.get_i16_le();
26590        __struct.xmag = buf.get_i16_le();
26591        __struct.ymag = buf.get_i16_le();
26592        __struct.zmag = buf.get_i16_le();
26593        __struct.temperature = buf.get_i16_le();
26594        Ok(__struct)
26595    }
26596    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26597        let mut __tmp = BytesMut::new(bytes);
26598        #[allow(clippy::absurd_extreme_comparisons)]
26599        #[allow(unused_comparisons)]
26600        if __tmp.remaining() < Self::ENCODED_LEN {
26601            panic!(
26602                "buffer is too small (need {} bytes, but got {})",
26603                Self::ENCODED_LEN,
26604                __tmp.remaining(),
26605            )
26606        }
26607        __tmp.put_u32_le(self.time_boot_ms);
26608        __tmp.put_i16_le(self.xacc);
26609        __tmp.put_i16_le(self.yacc);
26610        __tmp.put_i16_le(self.zacc);
26611        __tmp.put_i16_le(self.xgyro);
26612        __tmp.put_i16_le(self.ygyro);
26613        __tmp.put_i16_le(self.zgyro);
26614        __tmp.put_i16_le(self.xmag);
26615        __tmp.put_i16_le(self.ymag);
26616        __tmp.put_i16_le(self.zmag);
26617        __tmp.put_i16_le(self.temperature);
26618        if matches!(version, MavlinkVersion::V2) {
26619            let len = __tmp.len();
26620            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26621        } else {
26622            __tmp.len()
26623        }
26624    }
26625}
26626#[doc = "id: 129"]
26627#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
26628#[derive(Debug, Clone, PartialEq)]
26629#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26630#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26631pub struct SCALED_IMU3_DATA {
26632    #[doc = "Timestamp (time since system boot)."]
26633    pub time_boot_ms: u32,
26634    #[doc = "X acceleration"]
26635    pub xacc: i16,
26636    #[doc = "Y acceleration"]
26637    pub yacc: i16,
26638    #[doc = "Z acceleration"]
26639    pub zacc: i16,
26640    #[doc = "Angular speed around X axis"]
26641    pub xgyro: i16,
26642    #[doc = "Angular speed around Y axis"]
26643    pub ygyro: i16,
26644    #[doc = "Angular speed around Z axis"]
26645    pub zgyro: i16,
26646    #[doc = "X Magnetic field"]
26647    pub xmag: i16,
26648    #[doc = "Y Magnetic field"]
26649    pub ymag: i16,
26650    #[doc = "Z Magnetic field"]
26651    pub zmag: i16,
26652    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26653    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26654    pub temperature: i16,
26655}
26656impl SCALED_IMU3_DATA {
26657    pub const ENCODED_LEN: usize = 24usize;
26658    pub const DEFAULT: Self = Self {
26659        time_boot_ms: 0_u32,
26660        xacc: 0_i16,
26661        yacc: 0_i16,
26662        zacc: 0_i16,
26663        xgyro: 0_i16,
26664        ygyro: 0_i16,
26665        zgyro: 0_i16,
26666        xmag: 0_i16,
26667        ymag: 0_i16,
26668        zmag: 0_i16,
26669        temperature: 0_i16,
26670    };
26671    #[cfg(feature = "arbitrary")]
26672    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26673        use arbitrary::{Arbitrary, Unstructured};
26674        let mut buf = [0u8; 1024];
26675        rng.fill_bytes(&mut buf);
26676        let mut unstructured = Unstructured::new(&buf);
26677        Self::arbitrary(&mut unstructured).unwrap_or_default()
26678    }
26679}
26680impl Default for SCALED_IMU3_DATA {
26681    fn default() -> Self {
26682        Self::DEFAULT.clone()
26683    }
26684}
26685impl MessageData for SCALED_IMU3_DATA {
26686    type Message = MavMessage;
26687    const ID: u32 = 129u32;
26688    const NAME: &'static str = "SCALED_IMU3";
26689    const EXTRA_CRC: u8 = 46u8;
26690    const ENCODED_LEN: usize = 24usize;
26691    fn deser(
26692        _version: MavlinkVersion,
26693        __input: &[u8],
26694    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26695        let avail_len = __input.len();
26696        let mut payload_buf = [0; Self::ENCODED_LEN];
26697        let mut buf = if avail_len < Self::ENCODED_LEN {
26698            payload_buf[0..avail_len].copy_from_slice(__input);
26699            Bytes::new(&payload_buf)
26700        } else {
26701            Bytes::new(__input)
26702        };
26703        let mut __struct = Self::default();
26704        __struct.time_boot_ms = buf.get_u32_le();
26705        __struct.xacc = buf.get_i16_le();
26706        __struct.yacc = buf.get_i16_le();
26707        __struct.zacc = buf.get_i16_le();
26708        __struct.xgyro = buf.get_i16_le();
26709        __struct.ygyro = buf.get_i16_le();
26710        __struct.zgyro = buf.get_i16_le();
26711        __struct.xmag = buf.get_i16_le();
26712        __struct.ymag = buf.get_i16_le();
26713        __struct.zmag = buf.get_i16_le();
26714        __struct.temperature = buf.get_i16_le();
26715        Ok(__struct)
26716    }
26717    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26718        let mut __tmp = BytesMut::new(bytes);
26719        #[allow(clippy::absurd_extreme_comparisons)]
26720        #[allow(unused_comparisons)]
26721        if __tmp.remaining() < Self::ENCODED_LEN {
26722            panic!(
26723                "buffer is too small (need {} bytes, but got {})",
26724                Self::ENCODED_LEN,
26725                __tmp.remaining(),
26726            )
26727        }
26728        __tmp.put_u32_le(self.time_boot_ms);
26729        __tmp.put_i16_le(self.xacc);
26730        __tmp.put_i16_le(self.yacc);
26731        __tmp.put_i16_le(self.zacc);
26732        __tmp.put_i16_le(self.xgyro);
26733        __tmp.put_i16_le(self.ygyro);
26734        __tmp.put_i16_le(self.zgyro);
26735        __tmp.put_i16_le(self.xmag);
26736        __tmp.put_i16_le(self.ymag);
26737        __tmp.put_i16_le(self.zmag);
26738        __tmp.put_i16_le(self.temperature);
26739        if matches!(version, MavlinkVersion::V2) {
26740            let len = __tmp.len();
26741            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26742        } else {
26743            __tmp.len()
26744        }
26745    }
26746}
26747#[doc = "id: 29"]
26748#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
26749#[derive(Debug, Clone, PartialEq)]
26750#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26751#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26752pub struct SCALED_PRESSURE_DATA {
26753    #[doc = "Timestamp (time since system boot)."]
26754    pub time_boot_ms: u32,
26755    #[doc = "Absolute pressure"]
26756    pub press_abs: f32,
26757    #[doc = "Differential pressure 1"]
26758    pub press_diff: f32,
26759    #[doc = "Absolute pressure temperature"]
26760    pub temperature: i16,
26761    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26762    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26763    pub temperature_press_diff: i16,
26764}
26765impl SCALED_PRESSURE_DATA {
26766    pub const ENCODED_LEN: usize = 16usize;
26767    pub const DEFAULT: Self = Self {
26768        time_boot_ms: 0_u32,
26769        press_abs: 0.0_f32,
26770        press_diff: 0.0_f32,
26771        temperature: 0_i16,
26772        temperature_press_diff: 0_i16,
26773    };
26774    #[cfg(feature = "arbitrary")]
26775    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26776        use arbitrary::{Arbitrary, Unstructured};
26777        let mut buf = [0u8; 1024];
26778        rng.fill_bytes(&mut buf);
26779        let mut unstructured = Unstructured::new(&buf);
26780        Self::arbitrary(&mut unstructured).unwrap_or_default()
26781    }
26782}
26783impl Default for SCALED_PRESSURE_DATA {
26784    fn default() -> Self {
26785        Self::DEFAULT.clone()
26786    }
26787}
26788impl MessageData for SCALED_PRESSURE_DATA {
26789    type Message = MavMessage;
26790    const ID: u32 = 29u32;
26791    const NAME: &'static str = "SCALED_PRESSURE";
26792    const EXTRA_CRC: u8 = 115u8;
26793    const ENCODED_LEN: usize = 16usize;
26794    fn deser(
26795        _version: MavlinkVersion,
26796        __input: &[u8],
26797    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26798        let avail_len = __input.len();
26799        let mut payload_buf = [0; Self::ENCODED_LEN];
26800        let mut buf = if avail_len < Self::ENCODED_LEN {
26801            payload_buf[0..avail_len].copy_from_slice(__input);
26802            Bytes::new(&payload_buf)
26803        } else {
26804            Bytes::new(__input)
26805        };
26806        let mut __struct = Self::default();
26807        __struct.time_boot_ms = buf.get_u32_le();
26808        __struct.press_abs = buf.get_f32_le();
26809        __struct.press_diff = buf.get_f32_le();
26810        __struct.temperature = buf.get_i16_le();
26811        __struct.temperature_press_diff = buf.get_i16_le();
26812        Ok(__struct)
26813    }
26814    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26815        let mut __tmp = BytesMut::new(bytes);
26816        #[allow(clippy::absurd_extreme_comparisons)]
26817        #[allow(unused_comparisons)]
26818        if __tmp.remaining() < Self::ENCODED_LEN {
26819            panic!(
26820                "buffer is too small (need {} bytes, but got {})",
26821                Self::ENCODED_LEN,
26822                __tmp.remaining(),
26823            )
26824        }
26825        __tmp.put_u32_le(self.time_boot_ms);
26826        __tmp.put_f32_le(self.press_abs);
26827        __tmp.put_f32_le(self.press_diff);
26828        __tmp.put_i16_le(self.temperature);
26829        __tmp.put_i16_le(self.temperature_press_diff);
26830        if matches!(version, MavlinkVersion::V2) {
26831            let len = __tmp.len();
26832            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26833        } else {
26834            __tmp.len()
26835        }
26836    }
26837}
26838#[doc = "id: 137"]
26839#[doc = "Barometer readings for 2nd barometer."]
26840#[derive(Debug, Clone, PartialEq)]
26841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26843pub struct SCALED_PRESSURE2_DATA {
26844    #[doc = "Timestamp (time since system boot)."]
26845    pub time_boot_ms: u32,
26846    #[doc = "Absolute pressure"]
26847    pub press_abs: f32,
26848    #[doc = "Differential pressure"]
26849    pub press_diff: f32,
26850    #[doc = "Absolute pressure temperature"]
26851    pub temperature: i16,
26852    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26853    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26854    pub temperature_press_diff: i16,
26855}
26856impl SCALED_PRESSURE2_DATA {
26857    pub const ENCODED_LEN: usize = 16usize;
26858    pub const DEFAULT: Self = Self {
26859        time_boot_ms: 0_u32,
26860        press_abs: 0.0_f32,
26861        press_diff: 0.0_f32,
26862        temperature: 0_i16,
26863        temperature_press_diff: 0_i16,
26864    };
26865    #[cfg(feature = "arbitrary")]
26866    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26867        use arbitrary::{Arbitrary, Unstructured};
26868        let mut buf = [0u8; 1024];
26869        rng.fill_bytes(&mut buf);
26870        let mut unstructured = Unstructured::new(&buf);
26871        Self::arbitrary(&mut unstructured).unwrap_or_default()
26872    }
26873}
26874impl Default for SCALED_PRESSURE2_DATA {
26875    fn default() -> Self {
26876        Self::DEFAULT.clone()
26877    }
26878}
26879impl MessageData for SCALED_PRESSURE2_DATA {
26880    type Message = MavMessage;
26881    const ID: u32 = 137u32;
26882    const NAME: &'static str = "SCALED_PRESSURE2";
26883    const EXTRA_CRC: u8 = 195u8;
26884    const ENCODED_LEN: usize = 16usize;
26885    fn deser(
26886        _version: MavlinkVersion,
26887        __input: &[u8],
26888    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26889        let avail_len = __input.len();
26890        let mut payload_buf = [0; Self::ENCODED_LEN];
26891        let mut buf = if avail_len < Self::ENCODED_LEN {
26892            payload_buf[0..avail_len].copy_from_slice(__input);
26893            Bytes::new(&payload_buf)
26894        } else {
26895            Bytes::new(__input)
26896        };
26897        let mut __struct = Self::default();
26898        __struct.time_boot_ms = buf.get_u32_le();
26899        __struct.press_abs = buf.get_f32_le();
26900        __struct.press_diff = buf.get_f32_le();
26901        __struct.temperature = buf.get_i16_le();
26902        __struct.temperature_press_diff = buf.get_i16_le();
26903        Ok(__struct)
26904    }
26905    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26906        let mut __tmp = BytesMut::new(bytes);
26907        #[allow(clippy::absurd_extreme_comparisons)]
26908        #[allow(unused_comparisons)]
26909        if __tmp.remaining() < Self::ENCODED_LEN {
26910            panic!(
26911                "buffer is too small (need {} bytes, but got {})",
26912                Self::ENCODED_LEN,
26913                __tmp.remaining(),
26914            )
26915        }
26916        __tmp.put_u32_le(self.time_boot_ms);
26917        __tmp.put_f32_le(self.press_abs);
26918        __tmp.put_f32_le(self.press_diff);
26919        __tmp.put_i16_le(self.temperature);
26920        __tmp.put_i16_le(self.temperature_press_diff);
26921        if matches!(version, MavlinkVersion::V2) {
26922            let len = __tmp.len();
26923            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26924        } else {
26925            __tmp.len()
26926        }
26927    }
26928}
26929#[doc = "id: 143"]
26930#[doc = "Barometer readings for 3rd barometer."]
26931#[derive(Debug, Clone, PartialEq)]
26932#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26933#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26934pub struct SCALED_PRESSURE3_DATA {
26935    #[doc = "Timestamp (time since system boot)."]
26936    pub time_boot_ms: u32,
26937    #[doc = "Absolute pressure"]
26938    pub press_abs: f32,
26939    #[doc = "Differential pressure"]
26940    pub press_diff: f32,
26941    #[doc = "Absolute pressure temperature"]
26942    pub temperature: i16,
26943    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26944    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26945    pub temperature_press_diff: i16,
26946}
26947impl SCALED_PRESSURE3_DATA {
26948    pub const ENCODED_LEN: usize = 16usize;
26949    pub const DEFAULT: Self = Self {
26950        time_boot_ms: 0_u32,
26951        press_abs: 0.0_f32,
26952        press_diff: 0.0_f32,
26953        temperature: 0_i16,
26954        temperature_press_diff: 0_i16,
26955    };
26956    #[cfg(feature = "arbitrary")]
26957    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26958        use arbitrary::{Arbitrary, Unstructured};
26959        let mut buf = [0u8; 1024];
26960        rng.fill_bytes(&mut buf);
26961        let mut unstructured = Unstructured::new(&buf);
26962        Self::arbitrary(&mut unstructured).unwrap_or_default()
26963    }
26964}
26965impl Default for SCALED_PRESSURE3_DATA {
26966    fn default() -> Self {
26967        Self::DEFAULT.clone()
26968    }
26969}
26970impl MessageData for SCALED_PRESSURE3_DATA {
26971    type Message = MavMessage;
26972    const ID: u32 = 143u32;
26973    const NAME: &'static str = "SCALED_PRESSURE3";
26974    const EXTRA_CRC: u8 = 131u8;
26975    const ENCODED_LEN: usize = 16usize;
26976    fn deser(
26977        _version: MavlinkVersion,
26978        __input: &[u8],
26979    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26980        let avail_len = __input.len();
26981        let mut payload_buf = [0; Self::ENCODED_LEN];
26982        let mut buf = if avail_len < Self::ENCODED_LEN {
26983            payload_buf[0..avail_len].copy_from_slice(__input);
26984            Bytes::new(&payload_buf)
26985        } else {
26986            Bytes::new(__input)
26987        };
26988        let mut __struct = Self::default();
26989        __struct.time_boot_ms = buf.get_u32_le();
26990        __struct.press_abs = buf.get_f32_le();
26991        __struct.press_diff = buf.get_f32_le();
26992        __struct.temperature = buf.get_i16_le();
26993        __struct.temperature_press_diff = buf.get_i16_le();
26994        Ok(__struct)
26995    }
26996    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26997        let mut __tmp = BytesMut::new(bytes);
26998        #[allow(clippy::absurd_extreme_comparisons)]
26999        #[allow(unused_comparisons)]
27000        if __tmp.remaining() < Self::ENCODED_LEN {
27001            panic!(
27002                "buffer is too small (need {} bytes, but got {})",
27003                Self::ENCODED_LEN,
27004                __tmp.remaining(),
27005            )
27006        }
27007        __tmp.put_u32_le(self.time_boot_ms);
27008        __tmp.put_f32_le(self.press_abs);
27009        __tmp.put_f32_le(self.press_diff);
27010        __tmp.put_i16_le(self.temperature);
27011        __tmp.put_i16_le(self.temperature_press_diff);
27012        if matches!(version, MavlinkVersion::V2) {
27013            let len = __tmp.len();
27014            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27015        } else {
27016            __tmp.len()
27017        }
27018    }
27019}
27020#[doc = "id: 126"]
27021#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27022#[derive(Debug, Clone, PartialEq)]
27023#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27024#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27025pub struct SERIAL_CONTROL_DATA {
27026    #[doc = "Baudrate of transfer. Zero means no change."]
27027    pub baudrate: u32,
27028    #[doc = "Timeout for reply data"]
27029    pub timeout: u16,
27030    #[doc = "Serial control device type."]
27031    pub device: SerialControlDev,
27032    #[doc = "Bitmap of serial control flags."]
27033    pub flags: SerialControlFlag,
27034    #[doc = "how many bytes in this transfer"]
27035    pub count: u8,
27036    #[doc = "serial data"]
27037    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27038    pub data: [u8; 70],
27039    #[doc = "System ID"]
27040    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27041    pub target_system: u8,
27042    #[doc = "Component ID"]
27043    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27044    pub target_component: u8,
27045}
27046impl SERIAL_CONTROL_DATA {
27047    pub const ENCODED_LEN: usize = 81usize;
27048    pub const DEFAULT: Self = Self {
27049        baudrate: 0_u32,
27050        timeout: 0_u16,
27051        device: SerialControlDev::DEFAULT,
27052        flags: SerialControlFlag::DEFAULT,
27053        count: 0_u8,
27054        data: [0_u8; 70usize],
27055        target_system: 0_u8,
27056        target_component: 0_u8,
27057    };
27058    #[cfg(feature = "arbitrary")]
27059    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27060        use arbitrary::{Arbitrary, Unstructured};
27061        let mut buf = [0u8; 1024];
27062        rng.fill_bytes(&mut buf);
27063        let mut unstructured = Unstructured::new(&buf);
27064        Self::arbitrary(&mut unstructured).unwrap_or_default()
27065    }
27066}
27067impl Default for SERIAL_CONTROL_DATA {
27068    fn default() -> Self {
27069        Self::DEFAULT.clone()
27070    }
27071}
27072impl MessageData for SERIAL_CONTROL_DATA {
27073    type Message = MavMessage;
27074    const ID: u32 = 126u32;
27075    const NAME: &'static str = "SERIAL_CONTROL";
27076    const EXTRA_CRC: u8 = 220u8;
27077    const ENCODED_LEN: usize = 81usize;
27078    fn deser(
27079        _version: MavlinkVersion,
27080        __input: &[u8],
27081    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27082        let avail_len = __input.len();
27083        let mut payload_buf = [0; Self::ENCODED_LEN];
27084        let mut buf = if avail_len < Self::ENCODED_LEN {
27085            payload_buf[0..avail_len].copy_from_slice(__input);
27086            Bytes::new(&payload_buf)
27087        } else {
27088            Bytes::new(__input)
27089        };
27090        let mut __struct = Self::default();
27091        __struct.baudrate = buf.get_u32_le();
27092        __struct.timeout = buf.get_u16_le();
27093        let tmp = buf.get_u8();
27094        __struct.device =
27095            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27096                enum_type: "SerialControlDev",
27097                value: tmp as u32,
27098            })?;
27099        let tmp = buf.get_u8();
27100        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
27101            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27102                flag_type: "SerialControlFlag",
27103                value: tmp as u32,
27104            })?;
27105        __struct.count = buf.get_u8();
27106        for v in &mut __struct.data {
27107            let val = buf.get_u8();
27108            *v = val;
27109        }
27110        __struct.target_system = buf.get_u8();
27111        __struct.target_component = buf.get_u8();
27112        Ok(__struct)
27113    }
27114    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27115        let mut __tmp = BytesMut::new(bytes);
27116        #[allow(clippy::absurd_extreme_comparisons)]
27117        #[allow(unused_comparisons)]
27118        if __tmp.remaining() < Self::ENCODED_LEN {
27119            panic!(
27120                "buffer is too small (need {} bytes, but got {})",
27121                Self::ENCODED_LEN,
27122                __tmp.remaining(),
27123            )
27124        }
27125        __tmp.put_u32_le(self.baudrate);
27126        __tmp.put_u16_le(self.timeout);
27127        __tmp.put_u8(self.device as u8);
27128        __tmp.put_u8(self.flags.bits());
27129        __tmp.put_u8(self.count);
27130        for val in &self.data {
27131            __tmp.put_u8(*val);
27132        }
27133        __tmp.put_u8(self.target_system);
27134        __tmp.put_u8(self.target_component);
27135        if matches!(version, MavlinkVersion::V2) {
27136            let len = __tmp.len();
27137            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27138        } else {
27139            __tmp.len()
27140        }
27141    }
27142}
27143#[doc = "id: 177"]
27144#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F13: format."]
27145#[derive(Debug, Clone, PartialEq)]
27146#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27147#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27148pub struct SERIAL_UDB_EXTRA_F13_DATA {
27149    #[doc = "Serial UDB Extra MP Origin Latitude"]
27150    pub sue_lat_origin: i32,
27151    #[doc = "Serial UDB Extra MP Origin Longitude"]
27152    pub sue_lon_origin: i32,
27153    #[doc = "Serial UDB Extra MP Origin Altitude Above Sea Level"]
27154    pub sue_alt_origin: i32,
27155    #[doc = "Serial UDB Extra GPS Week Number"]
27156    pub sue_week_no: i16,
27157}
27158impl SERIAL_UDB_EXTRA_F13_DATA {
27159    pub const ENCODED_LEN: usize = 14usize;
27160    pub const DEFAULT: Self = Self {
27161        sue_lat_origin: 0_i32,
27162        sue_lon_origin: 0_i32,
27163        sue_alt_origin: 0_i32,
27164        sue_week_no: 0_i16,
27165    };
27166    #[cfg(feature = "arbitrary")]
27167    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27168        use arbitrary::{Arbitrary, Unstructured};
27169        let mut buf = [0u8; 1024];
27170        rng.fill_bytes(&mut buf);
27171        let mut unstructured = Unstructured::new(&buf);
27172        Self::arbitrary(&mut unstructured).unwrap_or_default()
27173    }
27174}
27175impl Default for SERIAL_UDB_EXTRA_F13_DATA {
27176    fn default() -> Self {
27177        Self::DEFAULT.clone()
27178    }
27179}
27180impl MessageData for SERIAL_UDB_EXTRA_F13_DATA {
27181    type Message = MavMessage;
27182    const ID: u32 = 177u32;
27183    const NAME: &'static str = "SERIAL_UDB_EXTRA_F13";
27184    const EXTRA_CRC: u8 = 249u8;
27185    const ENCODED_LEN: usize = 14usize;
27186    fn deser(
27187        _version: MavlinkVersion,
27188        __input: &[u8],
27189    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27190        let avail_len = __input.len();
27191        let mut payload_buf = [0; Self::ENCODED_LEN];
27192        let mut buf = if avail_len < Self::ENCODED_LEN {
27193            payload_buf[0..avail_len].copy_from_slice(__input);
27194            Bytes::new(&payload_buf)
27195        } else {
27196            Bytes::new(__input)
27197        };
27198        let mut __struct = Self::default();
27199        __struct.sue_lat_origin = buf.get_i32_le();
27200        __struct.sue_lon_origin = buf.get_i32_le();
27201        __struct.sue_alt_origin = buf.get_i32_le();
27202        __struct.sue_week_no = buf.get_i16_le();
27203        Ok(__struct)
27204    }
27205    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27206        let mut __tmp = BytesMut::new(bytes);
27207        #[allow(clippy::absurd_extreme_comparisons)]
27208        #[allow(unused_comparisons)]
27209        if __tmp.remaining() < Self::ENCODED_LEN {
27210            panic!(
27211                "buffer is too small (need {} bytes, but got {})",
27212                Self::ENCODED_LEN,
27213                __tmp.remaining(),
27214            )
27215        }
27216        __tmp.put_i32_le(self.sue_lat_origin);
27217        __tmp.put_i32_le(self.sue_lon_origin);
27218        __tmp.put_i32_le(self.sue_alt_origin);
27219        __tmp.put_i16_le(self.sue_week_no);
27220        if matches!(version, MavlinkVersion::V2) {
27221            let len = __tmp.len();
27222            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27223        } else {
27224            __tmp.len()
27225        }
27226    }
27227}
27228#[doc = "id: 178"]
27229#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F14: format."]
27230#[derive(Debug, Clone, PartialEq)]
27231#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27232#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27233pub struct SERIAL_UDB_EXTRA_F14_DATA {
27234    #[doc = "Serial UDB Extra Type Program Address of Last Trap"]
27235    pub sue_TRAP_SOURCE: u32,
27236    #[doc = "Serial UDB Extra Reboot Register of DSPIC"]
27237    pub sue_RCON: i16,
27238    #[doc = "Serial UDB Extra  Last dspic Trap Flags"]
27239    pub sue_TRAP_FLAGS: i16,
27240    #[doc = "Serial UDB Extra Number of Ocillator Failures"]
27241    pub sue_osc_fail_count: i16,
27242    #[doc = "Serial UDB Extra Wind Estimation Enabled"]
27243    pub sue_WIND_ESTIMATION: u8,
27244    #[doc = "Serial UDB Extra Type of GPS Unit"]
27245    pub sue_GPS_TYPE: u8,
27246    #[doc = "Serial UDB Extra Dead Reckoning Enabled"]
27247    pub sue_DR: u8,
27248    #[doc = "Serial UDB Extra Type of UDB Hardware"]
27249    pub sue_BOARD_TYPE: u8,
27250    #[doc = "Serial UDB Extra Type of Airframe"]
27251    pub sue_AIRFRAME: u8,
27252    #[doc = "Serial UDB Extra UDB Internal Clock Configuration"]
27253    pub sue_CLOCK_CONFIG: u8,
27254    #[doc = "Serial UDB Extra Type of Flight Plan"]
27255    pub sue_FLIGHT_PLAN_TYPE: u8,
27256}
27257impl SERIAL_UDB_EXTRA_F14_DATA {
27258    pub const ENCODED_LEN: usize = 17usize;
27259    pub const DEFAULT: Self = Self {
27260        sue_TRAP_SOURCE: 0_u32,
27261        sue_RCON: 0_i16,
27262        sue_TRAP_FLAGS: 0_i16,
27263        sue_osc_fail_count: 0_i16,
27264        sue_WIND_ESTIMATION: 0_u8,
27265        sue_GPS_TYPE: 0_u8,
27266        sue_DR: 0_u8,
27267        sue_BOARD_TYPE: 0_u8,
27268        sue_AIRFRAME: 0_u8,
27269        sue_CLOCK_CONFIG: 0_u8,
27270        sue_FLIGHT_PLAN_TYPE: 0_u8,
27271    };
27272    #[cfg(feature = "arbitrary")]
27273    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27274        use arbitrary::{Arbitrary, Unstructured};
27275        let mut buf = [0u8; 1024];
27276        rng.fill_bytes(&mut buf);
27277        let mut unstructured = Unstructured::new(&buf);
27278        Self::arbitrary(&mut unstructured).unwrap_or_default()
27279    }
27280}
27281impl Default for SERIAL_UDB_EXTRA_F14_DATA {
27282    fn default() -> Self {
27283        Self::DEFAULT.clone()
27284    }
27285}
27286impl MessageData for SERIAL_UDB_EXTRA_F14_DATA {
27287    type Message = MavMessage;
27288    const ID: u32 = 178u32;
27289    const NAME: &'static str = "SERIAL_UDB_EXTRA_F14";
27290    const EXTRA_CRC: u8 = 123u8;
27291    const ENCODED_LEN: usize = 17usize;
27292    fn deser(
27293        _version: MavlinkVersion,
27294        __input: &[u8],
27295    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27296        let avail_len = __input.len();
27297        let mut payload_buf = [0; Self::ENCODED_LEN];
27298        let mut buf = if avail_len < Self::ENCODED_LEN {
27299            payload_buf[0..avail_len].copy_from_slice(__input);
27300            Bytes::new(&payload_buf)
27301        } else {
27302            Bytes::new(__input)
27303        };
27304        let mut __struct = Self::default();
27305        __struct.sue_TRAP_SOURCE = buf.get_u32_le();
27306        __struct.sue_RCON = buf.get_i16_le();
27307        __struct.sue_TRAP_FLAGS = buf.get_i16_le();
27308        __struct.sue_osc_fail_count = buf.get_i16_le();
27309        __struct.sue_WIND_ESTIMATION = buf.get_u8();
27310        __struct.sue_GPS_TYPE = buf.get_u8();
27311        __struct.sue_DR = buf.get_u8();
27312        __struct.sue_BOARD_TYPE = buf.get_u8();
27313        __struct.sue_AIRFRAME = buf.get_u8();
27314        __struct.sue_CLOCK_CONFIG = buf.get_u8();
27315        __struct.sue_FLIGHT_PLAN_TYPE = buf.get_u8();
27316        Ok(__struct)
27317    }
27318    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27319        let mut __tmp = BytesMut::new(bytes);
27320        #[allow(clippy::absurd_extreme_comparisons)]
27321        #[allow(unused_comparisons)]
27322        if __tmp.remaining() < Self::ENCODED_LEN {
27323            panic!(
27324                "buffer is too small (need {} bytes, but got {})",
27325                Self::ENCODED_LEN,
27326                __tmp.remaining(),
27327            )
27328        }
27329        __tmp.put_u32_le(self.sue_TRAP_SOURCE);
27330        __tmp.put_i16_le(self.sue_RCON);
27331        __tmp.put_i16_le(self.sue_TRAP_FLAGS);
27332        __tmp.put_i16_le(self.sue_osc_fail_count);
27333        __tmp.put_u8(self.sue_WIND_ESTIMATION);
27334        __tmp.put_u8(self.sue_GPS_TYPE);
27335        __tmp.put_u8(self.sue_DR);
27336        __tmp.put_u8(self.sue_BOARD_TYPE);
27337        __tmp.put_u8(self.sue_AIRFRAME);
27338        __tmp.put_u8(self.sue_CLOCK_CONFIG);
27339        __tmp.put_u8(self.sue_FLIGHT_PLAN_TYPE);
27340        if matches!(version, MavlinkVersion::V2) {
27341            let len = __tmp.len();
27342            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27343        } else {
27344            __tmp.len()
27345        }
27346    }
27347}
27348#[doc = "id: 179"]
27349#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F15 format."]
27350#[derive(Debug, Clone, PartialEq)]
27351#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27352#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27353pub struct SERIAL_UDB_EXTRA_F15_DATA {
27354    #[doc = "Serial UDB Extra Model Name Of Vehicle"]
27355    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27356    pub sue_ID_VEHICLE_MODEL_NAME: [u8; 40],
27357    #[doc = "Serial UDB Extra Registraton Number of Vehicle"]
27358    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27359    pub sue_ID_VEHICLE_REGISTRATION: [u8; 20],
27360}
27361impl SERIAL_UDB_EXTRA_F15_DATA {
27362    pub const ENCODED_LEN: usize = 60usize;
27363    pub const DEFAULT: Self = Self {
27364        sue_ID_VEHICLE_MODEL_NAME: [0_u8; 40usize],
27365        sue_ID_VEHICLE_REGISTRATION: [0_u8; 20usize],
27366    };
27367    #[cfg(feature = "arbitrary")]
27368    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27369        use arbitrary::{Arbitrary, Unstructured};
27370        let mut buf = [0u8; 1024];
27371        rng.fill_bytes(&mut buf);
27372        let mut unstructured = Unstructured::new(&buf);
27373        Self::arbitrary(&mut unstructured).unwrap_or_default()
27374    }
27375}
27376impl Default for SERIAL_UDB_EXTRA_F15_DATA {
27377    fn default() -> Self {
27378        Self::DEFAULT.clone()
27379    }
27380}
27381impl MessageData for SERIAL_UDB_EXTRA_F15_DATA {
27382    type Message = MavMessage;
27383    const ID: u32 = 179u32;
27384    const NAME: &'static str = "SERIAL_UDB_EXTRA_F15";
27385    const EXTRA_CRC: u8 = 7u8;
27386    const ENCODED_LEN: usize = 60usize;
27387    fn deser(
27388        _version: MavlinkVersion,
27389        __input: &[u8],
27390    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27391        let avail_len = __input.len();
27392        let mut payload_buf = [0; Self::ENCODED_LEN];
27393        let mut buf = if avail_len < Self::ENCODED_LEN {
27394            payload_buf[0..avail_len].copy_from_slice(__input);
27395            Bytes::new(&payload_buf)
27396        } else {
27397            Bytes::new(__input)
27398        };
27399        let mut __struct = Self::default();
27400        for v in &mut __struct.sue_ID_VEHICLE_MODEL_NAME {
27401            let val = buf.get_u8();
27402            *v = val;
27403        }
27404        for v in &mut __struct.sue_ID_VEHICLE_REGISTRATION {
27405            let val = buf.get_u8();
27406            *v = val;
27407        }
27408        Ok(__struct)
27409    }
27410    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27411        let mut __tmp = BytesMut::new(bytes);
27412        #[allow(clippy::absurd_extreme_comparisons)]
27413        #[allow(unused_comparisons)]
27414        if __tmp.remaining() < Self::ENCODED_LEN {
27415            panic!(
27416                "buffer is too small (need {} bytes, but got {})",
27417                Self::ENCODED_LEN,
27418                __tmp.remaining(),
27419            )
27420        }
27421        for val in &self.sue_ID_VEHICLE_MODEL_NAME {
27422            __tmp.put_u8(*val);
27423        }
27424        for val in &self.sue_ID_VEHICLE_REGISTRATION {
27425            __tmp.put_u8(*val);
27426        }
27427        if matches!(version, MavlinkVersion::V2) {
27428            let len = __tmp.len();
27429            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27430        } else {
27431            __tmp.len()
27432        }
27433    }
27434}
27435#[doc = "id: 180"]
27436#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F16 format."]
27437#[derive(Debug, Clone, PartialEq)]
27438#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27439#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27440pub struct SERIAL_UDB_EXTRA_F16_DATA {
27441    #[doc = "Serial UDB Extra Name of Expected Lead Pilot"]
27442    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27443    pub sue_ID_LEAD_PILOT: [u8; 40],
27444    #[doc = "Serial UDB Extra URL of Lead Pilot or Team"]
27445    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27446    pub sue_ID_DIY_DRONES_URL: [u8; 70],
27447}
27448impl SERIAL_UDB_EXTRA_F16_DATA {
27449    pub const ENCODED_LEN: usize = 110usize;
27450    pub const DEFAULT: Self = Self {
27451        sue_ID_LEAD_PILOT: [0_u8; 40usize],
27452        sue_ID_DIY_DRONES_URL: [0_u8; 70usize],
27453    };
27454    #[cfg(feature = "arbitrary")]
27455    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27456        use arbitrary::{Arbitrary, Unstructured};
27457        let mut buf = [0u8; 1024];
27458        rng.fill_bytes(&mut buf);
27459        let mut unstructured = Unstructured::new(&buf);
27460        Self::arbitrary(&mut unstructured).unwrap_or_default()
27461    }
27462}
27463impl Default for SERIAL_UDB_EXTRA_F16_DATA {
27464    fn default() -> Self {
27465        Self::DEFAULT.clone()
27466    }
27467}
27468impl MessageData for SERIAL_UDB_EXTRA_F16_DATA {
27469    type Message = MavMessage;
27470    const ID: u32 = 180u32;
27471    const NAME: &'static str = "SERIAL_UDB_EXTRA_F16";
27472    const EXTRA_CRC: u8 = 222u8;
27473    const ENCODED_LEN: usize = 110usize;
27474    fn deser(
27475        _version: MavlinkVersion,
27476        __input: &[u8],
27477    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27478        let avail_len = __input.len();
27479        let mut payload_buf = [0; Self::ENCODED_LEN];
27480        let mut buf = if avail_len < Self::ENCODED_LEN {
27481            payload_buf[0..avail_len].copy_from_slice(__input);
27482            Bytes::new(&payload_buf)
27483        } else {
27484            Bytes::new(__input)
27485        };
27486        let mut __struct = Self::default();
27487        for v in &mut __struct.sue_ID_LEAD_PILOT {
27488            let val = buf.get_u8();
27489            *v = val;
27490        }
27491        for v in &mut __struct.sue_ID_DIY_DRONES_URL {
27492            let val = buf.get_u8();
27493            *v = val;
27494        }
27495        Ok(__struct)
27496    }
27497    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27498        let mut __tmp = BytesMut::new(bytes);
27499        #[allow(clippy::absurd_extreme_comparisons)]
27500        #[allow(unused_comparisons)]
27501        if __tmp.remaining() < Self::ENCODED_LEN {
27502            panic!(
27503                "buffer is too small (need {} bytes, but got {})",
27504                Self::ENCODED_LEN,
27505                __tmp.remaining(),
27506            )
27507        }
27508        for val in &self.sue_ID_LEAD_PILOT {
27509            __tmp.put_u8(*val);
27510        }
27511        for val in &self.sue_ID_DIY_DRONES_URL {
27512            __tmp.put_u8(*val);
27513        }
27514        if matches!(version, MavlinkVersion::V2) {
27515            let len = __tmp.len();
27516            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27517        } else {
27518            __tmp.len()
27519        }
27520    }
27521}
27522#[doc = "id: 183"]
27523#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F17 format."]
27524#[derive(Debug, Clone, PartialEq)]
27525#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27526#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27527pub struct SERIAL_UDB_EXTRA_F17_DATA {
27528    #[doc = "SUE Feed Forward Gain"]
27529    pub sue_feed_forward: f32,
27530    #[doc = "SUE Max Turn Rate when Navigating"]
27531    pub sue_turn_rate_nav: f32,
27532    #[doc = "SUE Max Turn Rate in Fly By Wire Mode"]
27533    pub sue_turn_rate_fbw: f32,
27534}
27535impl SERIAL_UDB_EXTRA_F17_DATA {
27536    pub const ENCODED_LEN: usize = 12usize;
27537    pub const DEFAULT: Self = Self {
27538        sue_feed_forward: 0.0_f32,
27539        sue_turn_rate_nav: 0.0_f32,
27540        sue_turn_rate_fbw: 0.0_f32,
27541    };
27542    #[cfg(feature = "arbitrary")]
27543    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27544        use arbitrary::{Arbitrary, Unstructured};
27545        let mut buf = [0u8; 1024];
27546        rng.fill_bytes(&mut buf);
27547        let mut unstructured = Unstructured::new(&buf);
27548        Self::arbitrary(&mut unstructured).unwrap_or_default()
27549    }
27550}
27551impl Default for SERIAL_UDB_EXTRA_F17_DATA {
27552    fn default() -> Self {
27553        Self::DEFAULT.clone()
27554    }
27555}
27556impl MessageData for SERIAL_UDB_EXTRA_F17_DATA {
27557    type Message = MavMessage;
27558    const ID: u32 = 183u32;
27559    const NAME: &'static str = "SERIAL_UDB_EXTRA_F17";
27560    const EXTRA_CRC: u8 = 175u8;
27561    const ENCODED_LEN: usize = 12usize;
27562    fn deser(
27563        _version: MavlinkVersion,
27564        __input: &[u8],
27565    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27566        let avail_len = __input.len();
27567        let mut payload_buf = [0; Self::ENCODED_LEN];
27568        let mut buf = if avail_len < Self::ENCODED_LEN {
27569            payload_buf[0..avail_len].copy_from_slice(__input);
27570            Bytes::new(&payload_buf)
27571        } else {
27572            Bytes::new(__input)
27573        };
27574        let mut __struct = Self::default();
27575        __struct.sue_feed_forward = buf.get_f32_le();
27576        __struct.sue_turn_rate_nav = buf.get_f32_le();
27577        __struct.sue_turn_rate_fbw = buf.get_f32_le();
27578        Ok(__struct)
27579    }
27580    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27581        let mut __tmp = BytesMut::new(bytes);
27582        #[allow(clippy::absurd_extreme_comparisons)]
27583        #[allow(unused_comparisons)]
27584        if __tmp.remaining() < Self::ENCODED_LEN {
27585            panic!(
27586                "buffer is too small (need {} bytes, but got {})",
27587                Self::ENCODED_LEN,
27588                __tmp.remaining(),
27589            )
27590        }
27591        __tmp.put_f32_le(self.sue_feed_forward);
27592        __tmp.put_f32_le(self.sue_turn_rate_nav);
27593        __tmp.put_f32_le(self.sue_turn_rate_fbw);
27594        if matches!(version, MavlinkVersion::V2) {
27595            let len = __tmp.len();
27596            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27597        } else {
27598            __tmp.len()
27599        }
27600    }
27601}
27602#[doc = "id: 184"]
27603#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F18 format."]
27604#[derive(Debug, Clone, PartialEq)]
27605#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27606#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27607pub struct SERIAL_UDB_EXTRA_F18_DATA {
27608    #[doc = "SUE Angle of Attack Normal"]
27609    pub angle_of_attack_normal: f32,
27610    #[doc = "SUE Angle of Attack Inverted"]
27611    pub angle_of_attack_inverted: f32,
27612    #[doc = "SUE Elevator Trim Normal"]
27613    pub elevator_trim_normal: f32,
27614    #[doc = "SUE Elevator Trim Inverted"]
27615    pub elevator_trim_inverted: f32,
27616    #[doc = "SUE reference_speed"]
27617    pub reference_speed: f32,
27618}
27619impl SERIAL_UDB_EXTRA_F18_DATA {
27620    pub const ENCODED_LEN: usize = 20usize;
27621    pub const DEFAULT: Self = Self {
27622        angle_of_attack_normal: 0.0_f32,
27623        angle_of_attack_inverted: 0.0_f32,
27624        elevator_trim_normal: 0.0_f32,
27625        elevator_trim_inverted: 0.0_f32,
27626        reference_speed: 0.0_f32,
27627    };
27628    #[cfg(feature = "arbitrary")]
27629    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27630        use arbitrary::{Arbitrary, Unstructured};
27631        let mut buf = [0u8; 1024];
27632        rng.fill_bytes(&mut buf);
27633        let mut unstructured = Unstructured::new(&buf);
27634        Self::arbitrary(&mut unstructured).unwrap_or_default()
27635    }
27636}
27637impl Default for SERIAL_UDB_EXTRA_F18_DATA {
27638    fn default() -> Self {
27639        Self::DEFAULT.clone()
27640    }
27641}
27642impl MessageData for SERIAL_UDB_EXTRA_F18_DATA {
27643    type Message = MavMessage;
27644    const ID: u32 = 184u32;
27645    const NAME: &'static str = "SERIAL_UDB_EXTRA_F18";
27646    const EXTRA_CRC: u8 = 41u8;
27647    const ENCODED_LEN: usize = 20usize;
27648    fn deser(
27649        _version: MavlinkVersion,
27650        __input: &[u8],
27651    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27652        let avail_len = __input.len();
27653        let mut payload_buf = [0; Self::ENCODED_LEN];
27654        let mut buf = if avail_len < Self::ENCODED_LEN {
27655            payload_buf[0..avail_len].copy_from_slice(__input);
27656            Bytes::new(&payload_buf)
27657        } else {
27658            Bytes::new(__input)
27659        };
27660        let mut __struct = Self::default();
27661        __struct.angle_of_attack_normal = buf.get_f32_le();
27662        __struct.angle_of_attack_inverted = buf.get_f32_le();
27663        __struct.elevator_trim_normal = buf.get_f32_le();
27664        __struct.elevator_trim_inverted = buf.get_f32_le();
27665        __struct.reference_speed = buf.get_f32_le();
27666        Ok(__struct)
27667    }
27668    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27669        let mut __tmp = BytesMut::new(bytes);
27670        #[allow(clippy::absurd_extreme_comparisons)]
27671        #[allow(unused_comparisons)]
27672        if __tmp.remaining() < Self::ENCODED_LEN {
27673            panic!(
27674                "buffer is too small (need {} bytes, but got {})",
27675                Self::ENCODED_LEN,
27676                __tmp.remaining(),
27677            )
27678        }
27679        __tmp.put_f32_le(self.angle_of_attack_normal);
27680        __tmp.put_f32_le(self.angle_of_attack_inverted);
27681        __tmp.put_f32_le(self.elevator_trim_normal);
27682        __tmp.put_f32_le(self.elevator_trim_inverted);
27683        __tmp.put_f32_le(self.reference_speed);
27684        if matches!(version, MavlinkVersion::V2) {
27685            let len = __tmp.len();
27686            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27687        } else {
27688            __tmp.len()
27689        }
27690    }
27691}
27692#[doc = "id: 185"]
27693#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F19 format."]
27694#[derive(Debug, Clone, PartialEq)]
27695#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27696#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27697pub struct SERIAL_UDB_EXTRA_F19_DATA {
27698    #[doc = "SUE aileron output channel"]
27699    pub sue_aileron_output_channel: u8,
27700    #[doc = "SUE aileron reversed"]
27701    pub sue_aileron_reversed: u8,
27702    #[doc = "SUE elevator output channel"]
27703    pub sue_elevator_output_channel: u8,
27704    #[doc = "SUE elevator reversed"]
27705    pub sue_elevator_reversed: u8,
27706    #[doc = "SUE throttle output channel"]
27707    pub sue_throttle_output_channel: u8,
27708    #[doc = "SUE throttle reversed"]
27709    pub sue_throttle_reversed: u8,
27710    #[doc = "SUE rudder output channel"]
27711    pub sue_rudder_output_channel: u8,
27712    #[doc = "SUE rudder reversed"]
27713    pub sue_rudder_reversed: u8,
27714}
27715impl SERIAL_UDB_EXTRA_F19_DATA {
27716    pub const ENCODED_LEN: usize = 8usize;
27717    pub const DEFAULT: Self = Self {
27718        sue_aileron_output_channel: 0_u8,
27719        sue_aileron_reversed: 0_u8,
27720        sue_elevator_output_channel: 0_u8,
27721        sue_elevator_reversed: 0_u8,
27722        sue_throttle_output_channel: 0_u8,
27723        sue_throttle_reversed: 0_u8,
27724        sue_rudder_output_channel: 0_u8,
27725        sue_rudder_reversed: 0_u8,
27726    };
27727    #[cfg(feature = "arbitrary")]
27728    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27729        use arbitrary::{Arbitrary, Unstructured};
27730        let mut buf = [0u8; 1024];
27731        rng.fill_bytes(&mut buf);
27732        let mut unstructured = Unstructured::new(&buf);
27733        Self::arbitrary(&mut unstructured).unwrap_or_default()
27734    }
27735}
27736impl Default for SERIAL_UDB_EXTRA_F19_DATA {
27737    fn default() -> Self {
27738        Self::DEFAULT.clone()
27739    }
27740}
27741impl MessageData for SERIAL_UDB_EXTRA_F19_DATA {
27742    type Message = MavMessage;
27743    const ID: u32 = 185u32;
27744    const NAME: &'static str = "SERIAL_UDB_EXTRA_F19";
27745    const EXTRA_CRC: u8 = 87u8;
27746    const ENCODED_LEN: usize = 8usize;
27747    fn deser(
27748        _version: MavlinkVersion,
27749        __input: &[u8],
27750    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27751        let avail_len = __input.len();
27752        let mut payload_buf = [0; Self::ENCODED_LEN];
27753        let mut buf = if avail_len < Self::ENCODED_LEN {
27754            payload_buf[0..avail_len].copy_from_slice(__input);
27755            Bytes::new(&payload_buf)
27756        } else {
27757            Bytes::new(__input)
27758        };
27759        let mut __struct = Self::default();
27760        __struct.sue_aileron_output_channel = buf.get_u8();
27761        __struct.sue_aileron_reversed = buf.get_u8();
27762        __struct.sue_elevator_output_channel = buf.get_u8();
27763        __struct.sue_elevator_reversed = buf.get_u8();
27764        __struct.sue_throttle_output_channel = buf.get_u8();
27765        __struct.sue_throttle_reversed = buf.get_u8();
27766        __struct.sue_rudder_output_channel = buf.get_u8();
27767        __struct.sue_rudder_reversed = buf.get_u8();
27768        Ok(__struct)
27769    }
27770    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27771        let mut __tmp = BytesMut::new(bytes);
27772        #[allow(clippy::absurd_extreme_comparisons)]
27773        #[allow(unused_comparisons)]
27774        if __tmp.remaining() < Self::ENCODED_LEN {
27775            panic!(
27776                "buffer is too small (need {} bytes, but got {})",
27777                Self::ENCODED_LEN,
27778                __tmp.remaining(),
27779            )
27780        }
27781        __tmp.put_u8(self.sue_aileron_output_channel);
27782        __tmp.put_u8(self.sue_aileron_reversed);
27783        __tmp.put_u8(self.sue_elevator_output_channel);
27784        __tmp.put_u8(self.sue_elevator_reversed);
27785        __tmp.put_u8(self.sue_throttle_output_channel);
27786        __tmp.put_u8(self.sue_throttle_reversed);
27787        __tmp.put_u8(self.sue_rudder_output_channel);
27788        __tmp.put_u8(self.sue_rudder_reversed);
27789        if matches!(version, MavlinkVersion::V2) {
27790            let len = __tmp.len();
27791            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27792        } else {
27793            __tmp.len()
27794        }
27795    }
27796}
27797#[doc = "id: 186"]
27798#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F20 format."]
27799#[derive(Debug, Clone, PartialEq)]
27800#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27801#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27802pub struct SERIAL_UDB_EXTRA_F20_DATA {
27803    #[doc = "SUE UDB PWM Trim Value on Input 1"]
27804    pub sue_trim_value_input_1: i16,
27805    #[doc = "SUE UDB PWM Trim Value on Input 2"]
27806    pub sue_trim_value_input_2: i16,
27807    #[doc = "SUE UDB PWM Trim Value on Input 3"]
27808    pub sue_trim_value_input_3: i16,
27809    #[doc = "SUE UDB PWM Trim Value on Input 4"]
27810    pub sue_trim_value_input_4: i16,
27811    #[doc = "SUE UDB PWM Trim Value on Input 5"]
27812    pub sue_trim_value_input_5: i16,
27813    #[doc = "SUE UDB PWM Trim Value on Input 6"]
27814    pub sue_trim_value_input_6: i16,
27815    #[doc = "SUE UDB PWM Trim Value on Input 7"]
27816    pub sue_trim_value_input_7: i16,
27817    #[doc = "SUE UDB PWM Trim Value on Input 8"]
27818    pub sue_trim_value_input_8: i16,
27819    #[doc = "SUE UDB PWM Trim Value on Input 9"]
27820    pub sue_trim_value_input_9: i16,
27821    #[doc = "SUE UDB PWM Trim Value on Input 10"]
27822    pub sue_trim_value_input_10: i16,
27823    #[doc = "SUE UDB PWM Trim Value on Input 11"]
27824    pub sue_trim_value_input_11: i16,
27825    #[doc = "SUE UDB PWM Trim Value on Input 12"]
27826    pub sue_trim_value_input_12: i16,
27827    #[doc = "SUE Number of Input Channels"]
27828    pub sue_number_of_inputs: u8,
27829}
27830impl SERIAL_UDB_EXTRA_F20_DATA {
27831    pub const ENCODED_LEN: usize = 25usize;
27832    pub const DEFAULT: Self = Self {
27833        sue_trim_value_input_1: 0_i16,
27834        sue_trim_value_input_2: 0_i16,
27835        sue_trim_value_input_3: 0_i16,
27836        sue_trim_value_input_4: 0_i16,
27837        sue_trim_value_input_5: 0_i16,
27838        sue_trim_value_input_6: 0_i16,
27839        sue_trim_value_input_7: 0_i16,
27840        sue_trim_value_input_8: 0_i16,
27841        sue_trim_value_input_9: 0_i16,
27842        sue_trim_value_input_10: 0_i16,
27843        sue_trim_value_input_11: 0_i16,
27844        sue_trim_value_input_12: 0_i16,
27845        sue_number_of_inputs: 0_u8,
27846    };
27847    #[cfg(feature = "arbitrary")]
27848    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27849        use arbitrary::{Arbitrary, Unstructured};
27850        let mut buf = [0u8; 1024];
27851        rng.fill_bytes(&mut buf);
27852        let mut unstructured = Unstructured::new(&buf);
27853        Self::arbitrary(&mut unstructured).unwrap_or_default()
27854    }
27855}
27856impl Default for SERIAL_UDB_EXTRA_F20_DATA {
27857    fn default() -> Self {
27858        Self::DEFAULT.clone()
27859    }
27860}
27861impl MessageData for SERIAL_UDB_EXTRA_F20_DATA {
27862    type Message = MavMessage;
27863    const ID: u32 = 186u32;
27864    const NAME: &'static str = "SERIAL_UDB_EXTRA_F20";
27865    const EXTRA_CRC: u8 = 144u8;
27866    const ENCODED_LEN: usize = 25usize;
27867    fn deser(
27868        _version: MavlinkVersion,
27869        __input: &[u8],
27870    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27871        let avail_len = __input.len();
27872        let mut payload_buf = [0; Self::ENCODED_LEN];
27873        let mut buf = if avail_len < Self::ENCODED_LEN {
27874            payload_buf[0..avail_len].copy_from_slice(__input);
27875            Bytes::new(&payload_buf)
27876        } else {
27877            Bytes::new(__input)
27878        };
27879        let mut __struct = Self::default();
27880        __struct.sue_trim_value_input_1 = buf.get_i16_le();
27881        __struct.sue_trim_value_input_2 = buf.get_i16_le();
27882        __struct.sue_trim_value_input_3 = buf.get_i16_le();
27883        __struct.sue_trim_value_input_4 = buf.get_i16_le();
27884        __struct.sue_trim_value_input_5 = buf.get_i16_le();
27885        __struct.sue_trim_value_input_6 = buf.get_i16_le();
27886        __struct.sue_trim_value_input_7 = buf.get_i16_le();
27887        __struct.sue_trim_value_input_8 = buf.get_i16_le();
27888        __struct.sue_trim_value_input_9 = buf.get_i16_le();
27889        __struct.sue_trim_value_input_10 = buf.get_i16_le();
27890        __struct.sue_trim_value_input_11 = buf.get_i16_le();
27891        __struct.sue_trim_value_input_12 = buf.get_i16_le();
27892        __struct.sue_number_of_inputs = buf.get_u8();
27893        Ok(__struct)
27894    }
27895    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27896        let mut __tmp = BytesMut::new(bytes);
27897        #[allow(clippy::absurd_extreme_comparisons)]
27898        #[allow(unused_comparisons)]
27899        if __tmp.remaining() < Self::ENCODED_LEN {
27900            panic!(
27901                "buffer is too small (need {} bytes, but got {})",
27902                Self::ENCODED_LEN,
27903                __tmp.remaining(),
27904            )
27905        }
27906        __tmp.put_i16_le(self.sue_trim_value_input_1);
27907        __tmp.put_i16_le(self.sue_trim_value_input_2);
27908        __tmp.put_i16_le(self.sue_trim_value_input_3);
27909        __tmp.put_i16_le(self.sue_trim_value_input_4);
27910        __tmp.put_i16_le(self.sue_trim_value_input_5);
27911        __tmp.put_i16_le(self.sue_trim_value_input_6);
27912        __tmp.put_i16_le(self.sue_trim_value_input_7);
27913        __tmp.put_i16_le(self.sue_trim_value_input_8);
27914        __tmp.put_i16_le(self.sue_trim_value_input_9);
27915        __tmp.put_i16_le(self.sue_trim_value_input_10);
27916        __tmp.put_i16_le(self.sue_trim_value_input_11);
27917        __tmp.put_i16_le(self.sue_trim_value_input_12);
27918        __tmp.put_u8(self.sue_number_of_inputs);
27919        if matches!(version, MavlinkVersion::V2) {
27920            let len = __tmp.len();
27921            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27922        } else {
27923            __tmp.len()
27924        }
27925    }
27926}
27927#[doc = "id: 187"]
27928#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F21 format."]
27929#[derive(Debug, Clone, PartialEq)]
27930#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27931#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27932pub struct SERIAL_UDB_EXTRA_F21_DATA {
27933    #[doc = "SUE X accelerometer offset"]
27934    pub sue_accel_x_offset: i16,
27935    #[doc = "SUE Y accelerometer offset"]
27936    pub sue_accel_y_offset: i16,
27937    #[doc = "SUE Z accelerometer offset"]
27938    pub sue_accel_z_offset: i16,
27939    #[doc = "SUE X gyro offset"]
27940    pub sue_gyro_x_offset: i16,
27941    #[doc = "SUE Y gyro offset"]
27942    pub sue_gyro_y_offset: i16,
27943    #[doc = "SUE Z gyro offset"]
27944    pub sue_gyro_z_offset: i16,
27945}
27946impl SERIAL_UDB_EXTRA_F21_DATA {
27947    pub const ENCODED_LEN: usize = 12usize;
27948    pub const DEFAULT: Self = Self {
27949        sue_accel_x_offset: 0_i16,
27950        sue_accel_y_offset: 0_i16,
27951        sue_accel_z_offset: 0_i16,
27952        sue_gyro_x_offset: 0_i16,
27953        sue_gyro_y_offset: 0_i16,
27954        sue_gyro_z_offset: 0_i16,
27955    };
27956    #[cfg(feature = "arbitrary")]
27957    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27958        use arbitrary::{Arbitrary, Unstructured};
27959        let mut buf = [0u8; 1024];
27960        rng.fill_bytes(&mut buf);
27961        let mut unstructured = Unstructured::new(&buf);
27962        Self::arbitrary(&mut unstructured).unwrap_or_default()
27963    }
27964}
27965impl Default for SERIAL_UDB_EXTRA_F21_DATA {
27966    fn default() -> Self {
27967        Self::DEFAULT.clone()
27968    }
27969}
27970impl MessageData for SERIAL_UDB_EXTRA_F21_DATA {
27971    type Message = MavMessage;
27972    const ID: u32 = 187u32;
27973    const NAME: &'static str = "SERIAL_UDB_EXTRA_F21";
27974    const EXTRA_CRC: u8 = 134u8;
27975    const ENCODED_LEN: usize = 12usize;
27976    fn deser(
27977        _version: MavlinkVersion,
27978        __input: &[u8],
27979    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27980        let avail_len = __input.len();
27981        let mut payload_buf = [0; Self::ENCODED_LEN];
27982        let mut buf = if avail_len < Self::ENCODED_LEN {
27983            payload_buf[0..avail_len].copy_from_slice(__input);
27984            Bytes::new(&payload_buf)
27985        } else {
27986            Bytes::new(__input)
27987        };
27988        let mut __struct = Self::default();
27989        __struct.sue_accel_x_offset = buf.get_i16_le();
27990        __struct.sue_accel_y_offset = buf.get_i16_le();
27991        __struct.sue_accel_z_offset = buf.get_i16_le();
27992        __struct.sue_gyro_x_offset = buf.get_i16_le();
27993        __struct.sue_gyro_y_offset = buf.get_i16_le();
27994        __struct.sue_gyro_z_offset = buf.get_i16_le();
27995        Ok(__struct)
27996    }
27997    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27998        let mut __tmp = BytesMut::new(bytes);
27999        #[allow(clippy::absurd_extreme_comparisons)]
28000        #[allow(unused_comparisons)]
28001        if __tmp.remaining() < Self::ENCODED_LEN {
28002            panic!(
28003                "buffer is too small (need {} bytes, but got {})",
28004                Self::ENCODED_LEN,
28005                __tmp.remaining(),
28006            )
28007        }
28008        __tmp.put_i16_le(self.sue_accel_x_offset);
28009        __tmp.put_i16_le(self.sue_accel_y_offset);
28010        __tmp.put_i16_le(self.sue_accel_z_offset);
28011        __tmp.put_i16_le(self.sue_gyro_x_offset);
28012        __tmp.put_i16_le(self.sue_gyro_y_offset);
28013        __tmp.put_i16_le(self.sue_gyro_z_offset);
28014        if matches!(version, MavlinkVersion::V2) {
28015            let len = __tmp.len();
28016            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28017        } else {
28018            __tmp.len()
28019        }
28020    }
28021}
28022#[doc = "id: 188"]
28023#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F22 format."]
28024#[derive(Debug, Clone, PartialEq)]
28025#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28026#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28027pub struct SERIAL_UDB_EXTRA_F22_DATA {
28028    #[doc = "SUE X accelerometer at calibration time"]
28029    pub sue_accel_x_at_calibration: i16,
28030    #[doc = "SUE Y accelerometer at calibration time"]
28031    pub sue_accel_y_at_calibration: i16,
28032    #[doc = "SUE Z accelerometer at calibration time"]
28033    pub sue_accel_z_at_calibration: i16,
28034    #[doc = "SUE X gyro at calibration time"]
28035    pub sue_gyro_x_at_calibration: i16,
28036    #[doc = "SUE Y gyro at calibration time"]
28037    pub sue_gyro_y_at_calibration: i16,
28038    #[doc = "SUE Z gyro at calibration time"]
28039    pub sue_gyro_z_at_calibration: i16,
28040}
28041impl SERIAL_UDB_EXTRA_F22_DATA {
28042    pub const ENCODED_LEN: usize = 12usize;
28043    pub const DEFAULT: Self = Self {
28044        sue_accel_x_at_calibration: 0_i16,
28045        sue_accel_y_at_calibration: 0_i16,
28046        sue_accel_z_at_calibration: 0_i16,
28047        sue_gyro_x_at_calibration: 0_i16,
28048        sue_gyro_y_at_calibration: 0_i16,
28049        sue_gyro_z_at_calibration: 0_i16,
28050    };
28051    #[cfg(feature = "arbitrary")]
28052    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28053        use arbitrary::{Arbitrary, Unstructured};
28054        let mut buf = [0u8; 1024];
28055        rng.fill_bytes(&mut buf);
28056        let mut unstructured = Unstructured::new(&buf);
28057        Self::arbitrary(&mut unstructured).unwrap_or_default()
28058    }
28059}
28060impl Default for SERIAL_UDB_EXTRA_F22_DATA {
28061    fn default() -> Self {
28062        Self::DEFAULT.clone()
28063    }
28064}
28065impl MessageData for SERIAL_UDB_EXTRA_F22_DATA {
28066    type Message = MavMessage;
28067    const ID: u32 = 188u32;
28068    const NAME: &'static str = "SERIAL_UDB_EXTRA_F22";
28069    const EXTRA_CRC: u8 = 91u8;
28070    const ENCODED_LEN: usize = 12usize;
28071    fn deser(
28072        _version: MavlinkVersion,
28073        __input: &[u8],
28074    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28075        let avail_len = __input.len();
28076        let mut payload_buf = [0; Self::ENCODED_LEN];
28077        let mut buf = if avail_len < Self::ENCODED_LEN {
28078            payload_buf[0..avail_len].copy_from_slice(__input);
28079            Bytes::new(&payload_buf)
28080        } else {
28081            Bytes::new(__input)
28082        };
28083        let mut __struct = Self::default();
28084        __struct.sue_accel_x_at_calibration = buf.get_i16_le();
28085        __struct.sue_accel_y_at_calibration = buf.get_i16_le();
28086        __struct.sue_accel_z_at_calibration = buf.get_i16_le();
28087        __struct.sue_gyro_x_at_calibration = buf.get_i16_le();
28088        __struct.sue_gyro_y_at_calibration = buf.get_i16_le();
28089        __struct.sue_gyro_z_at_calibration = buf.get_i16_le();
28090        Ok(__struct)
28091    }
28092    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28093        let mut __tmp = BytesMut::new(bytes);
28094        #[allow(clippy::absurd_extreme_comparisons)]
28095        #[allow(unused_comparisons)]
28096        if __tmp.remaining() < Self::ENCODED_LEN {
28097            panic!(
28098                "buffer is too small (need {} bytes, but got {})",
28099                Self::ENCODED_LEN,
28100                __tmp.remaining(),
28101            )
28102        }
28103        __tmp.put_i16_le(self.sue_accel_x_at_calibration);
28104        __tmp.put_i16_le(self.sue_accel_y_at_calibration);
28105        __tmp.put_i16_le(self.sue_accel_z_at_calibration);
28106        __tmp.put_i16_le(self.sue_gyro_x_at_calibration);
28107        __tmp.put_i16_le(self.sue_gyro_y_at_calibration);
28108        __tmp.put_i16_le(self.sue_gyro_z_at_calibration);
28109        if matches!(version, MavlinkVersion::V2) {
28110            let len = __tmp.len();
28111            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28112        } else {
28113            __tmp.len()
28114        }
28115    }
28116}
28117#[doc = "id: 170"]
28118#[doc = "Backwards compatible MAVLink version of SERIAL_UDB_EXTRA - F2: Format Part A."]
28119#[derive(Debug, Clone, PartialEq)]
28120#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28121#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28122pub struct SERIAL_UDB_EXTRA_F2_A_DATA {
28123    #[doc = "Serial UDB Extra Time"]
28124    pub sue_time: u32,
28125    #[doc = "Serial UDB Extra Latitude"]
28126    pub sue_latitude: i32,
28127    #[doc = "Serial UDB Extra Longitude"]
28128    pub sue_longitude: i32,
28129    #[doc = "Serial UDB Extra Altitude"]
28130    pub sue_altitude: i32,
28131    #[doc = "Serial UDB Extra Waypoint Index"]
28132    pub sue_waypoint_index: u16,
28133    #[doc = "Serial UDB Extra Rmat 0"]
28134    pub sue_rmat0: i16,
28135    #[doc = "Serial UDB Extra Rmat 1"]
28136    pub sue_rmat1: i16,
28137    #[doc = "Serial UDB Extra Rmat 2"]
28138    pub sue_rmat2: i16,
28139    #[doc = "Serial UDB Extra Rmat 3"]
28140    pub sue_rmat3: i16,
28141    #[doc = "Serial UDB Extra Rmat 4"]
28142    pub sue_rmat4: i16,
28143    #[doc = "Serial UDB Extra Rmat 5"]
28144    pub sue_rmat5: i16,
28145    #[doc = "Serial UDB Extra Rmat 6"]
28146    pub sue_rmat6: i16,
28147    #[doc = "Serial UDB Extra Rmat 7"]
28148    pub sue_rmat7: i16,
28149    #[doc = "Serial UDB Extra Rmat 8"]
28150    pub sue_rmat8: i16,
28151    #[doc = "Serial UDB Extra GPS Course Over Ground"]
28152    pub sue_cog: u16,
28153    #[doc = "Serial UDB Extra Speed Over Ground"]
28154    pub sue_sog: i16,
28155    #[doc = "Serial UDB Extra CPU Load"]
28156    pub sue_cpu_load: u16,
28157    #[doc = "Serial UDB Extra 3D IMU Air Speed"]
28158    pub sue_air_speed_3DIMU: u16,
28159    #[doc = "Serial UDB Extra Estimated Wind 0"]
28160    pub sue_estimated_wind_0: i16,
28161    #[doc = "Serial UDB Extra Estimated Wind 1"]
28162    pub sue_estimated_wind_1: i16,
28163    #[doc = "Serial UDB Extra Estimated Wind 2"]
28164    pub sue_estimated_wind_2: i16,
28165    #[doc = "Serial UDB Extra Magnetic Field Earth 0"]
28166    pub sue_magFieldEarth0: i16,
28167    #[doc = "Serial UDB Extra Magnetic Field Earth 1"]
28168    pub sue_magFieldEarth1: i16,
28169    #[doc = "Serial UDB Extra Magnetic Field Earth 2"]
28170    pub sue_magFieldEarth2: i16,
28171    #[doc = "Serial UDB Extra Number of Satellites in View"]
28172    pub sue_svs: i16,
28173    #[doc = "Serial UDB Extra GPS Horizontal Dilution of Precision"]
28174    pub sue_hdop: i16,
28175    #[doc = "Serial UDB Extra Status"]
28176    pub sue_status: u8,
28177}
28178impl SERIAL_UDB_EXTRA_F2_A_DATA {
28179    pub const ENCODED_LEN: usize = 61usize;
28180    pub const DEFAULT: Self = Self {
28181        sue_time: 0_u32,
28182        sue_latitude: 0_i32,
28183        sue_longitude: 0_i32,
28184        sue_altitude: 0_i32,
28185        sue_waypoint_index: 0_u16,
28186        sue_rmat0: 0_i16,
28187        sue_rmat1: 0_i16,
28188        sue_rmat2: 0_i16,
28189        sue_rmat3: 0_i16,
28190        sue_rmat4: 0_i16,
28191        sue_rmat5: 0_i16,
28192        sue_rmat6: 0_i16,
28193        sue_rmat7: 0_i16,
28194        sue_rmat8: 0_i16,
28195        sue_cog: 0_u16,
28196        sue_sog: 0_i16,
28197        sue_cpu_load: 0_u16,
28198        sue_air_speed_3DIMU: 0_u16,
28199        sue_estimated_wind_0: 0_i16,
28200        sue_estimated_wind_1: 0_i16,
28201        sue_estimated_wind_2: 0_i16,
28202        sue_magFieldEarth0: 0_i16,
28203        sue_magFieldEarth1: 0_i16,
28204        sue_magFieldEarth2: 0_i16,
28205        sue_svs: 0_i16,
28206        sue_hdop: 0_i16,
28207        sue_status: 0_u8,
28208    };
28209    #[cfg(feature = "arbitrary")]
28210    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28211        use arbitrary::{Arbitrary, Unstructured};
28212        let mut buf = [0u8; 1024];
28213        rng.fill_bytes(&mut buf);
28214        let mut unstructured = Unstructured::new(&buf);
28215        Self::arbitrary(&mut unstructured).unwrap_or_default()
28216    }
28217}
28218impl Default for SERIAL_UDB_EXTRA_F2_A_DATA {
28219    fn default() -> Self {
28220        Self::DEFAULT.clone()
28221    }
28222}
28223impl MessageData for SERIAL_UDB_EXTRA_F2_A_DATA {
28224    type Message = MavMessage;
28225    const ID: u32 = 170u32;
28226    const NAME: &'static str = "SERIAL_UDB_EXTRA_F2_A";
28227    const EXTRA_CRC: u8 = 103u8;
28228    const ENCODED_LEN: usize = 61usize;
28229    fn deser(
28230        _version: MavlinkVersion,
28231        __input: &[u8],
28232    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28233        let avail_len = __input.len();
28234        let mut payload_buf = [0; Self::ENCODED_LEN];
28235        let mut buf = if avail_len < Self::ENCODED_LEN {
28236            payload_buf[0..avail_len].copy_from_slice(__input);
28237            Bytes::new(&payload_buf)
28238        } else {
28239            Bytes::new(__input)
28240        };
28241        let mut __struct = Self::default();
28242        __struct.sue_time = buf.get_u32_le();
28243        __struct.sue_latitude = buf.get_i32_le();
28244        __struct.sue_longitude = buf.get_i32_le();
28245        __struct.sue_altitude = buf.get_i32_le();
28246        __struct.sue_waypoint_index = buf.get_u16_le();
28247        __struct.sue_rmat0 = buf.get_i16_le();
28248        __struct.sue_rmat1 = buf.get_i16_le();
28249        __struct.sue_rmat2 = buf.get_i16_le();
28250        __struct.sue_rmat3 = buf.get_i16_le();
28251        __struct.sue_rmat4 = buf.get_i16_le();
28252        __struct.sue_rmat5 = buf.get_i16_le();
28253        __struct.sue_rmat6 = buf.get_i16_le();
28254        __struct.sue_rmat7 = buf.get_i16_le();
28255        __struct.sue_rmat8 = buf.get_i16_le();
28256        __struct.sue_cog = buf.get_u16_le();
28257        __struct.sue_sog = buf.get_i16_le();
28258        __struct.sue_cpu_load = buf.get_u16_le();
28259        __struct.sue_air_speed_3DIMU = buf.get_u16_le();
28260        __struct.sue_estimated_wind_0 = buf.get_i16_le();
28261        __struct.sue_estimated_wind_1 = buf.get_i16_le();
28262        __struct.sue_estimated_wind_2 = buf.get_i16_le();
28263        __struct.sue_magFieldEarth0 = buf.get_i16_le();
28264        __struct.sue_magFieldEarth1 = buf.get_i16_le();
28265        __struct.sue_magFieldEarth2 = buf.get_i16_le();
28266        __struct.sue_svs = buf.get_i16_le();
28267        __struct.sue_hdop = buf.get_i16_le();
28268        __struct.sue_status = buf.get_u8();
28269        Ok(__struct)
28270    }
28271    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28272        let mut __tmp = BytesMut::new(bytes);
28273        #[allow(clippy::absurd_extreme_comparisons)]
28274        #[allow(unused_comparisons)]
28275        if __tmp.remaining() < Self::ENCODED_LEN {
28276            panic!(
28277                "buffer is too small (need {} bytes, but got {})",
28278                Self::ENCODED_LEN,
28279                __tmp.remaining(),
28280            )
28281        }
28282        __tmp.put_u32_le(self.sue_time);
28283        __tmp.put_i32_le(self.sue_latitude);
28284        __tmp.put_i32_le(self.sue_longitude);
28285        __tmp.put_i32_le(self.sue_altitude);
28286        __tmp.put_u16_le(self.sue_waypoint_index);
28287        __tmp.put_i16_le(self.sue_rmat0);
28288        __tmp.put_i16_le(self.sue_rmat1);
28289        __tmp.put_i16_le(self.sue_rmat2);
28290        __tmp.put_i16_le(self.sue_rmat3);
28291        __tmp.put_i16_le(self.sue_rmat4);
28292        __tmp.put_i16_le(self.sue_rmat5);
28293        __tmp.put_i16_le(self.sue_rmat6);
28294        __tmp.put_i16_le(self.sue_rmat7);
28295        __tmp.put_i16_le(self.sue_rmat8);
28296        __tmp.put_u16_le(self.sue_cog);
28297        __tmp.put_i16_le(self.sue_sog);
28298        __tmp.put_u16_le(self.sue_cpu_load);
28299        __tmp.put_u16_le(self.sue_air_speed_3DIMU);
28300        __tmp.put_i16_le(self.sue_estimated_wind_0);
28301        __tmp.put_i16_le(self.sue_estimated_wind_1);
28302        __tmp.put_i16_le(self.sue_estimated_wind_2);
28303        __tmp.put_i16_le(self.sue_magFieldEarth0);
28304        __tmp.put_i16_le(self.sue_magFieldEarth1);
28305        __tmp.put_i16_le(self.sue_magFieldEarth2);
28306        __tmp.put_i16_le(self.sue_svs);
28307        __tmp.put_i16_le(self.sue_hdop);
28308        __tmp.put_u8(self.sue_status);
28309        if matches!(version, MavlinkVersion::V2) {
28310            let len = __tmp.len();
28311            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28312        } else {
28313            __tmp.len()
28314        }
28315    }
28316}
28317#[doc = "id: 171"]
28318#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA - F2: Part B."]
28319#[derive(Debug, Clone, PartialEq)]
28320#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28321#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28322pub struct SERIAL_UDB_EXTRA_F2_B_DATA {
28323    #[doc = "Serial UDB Extra Time"]
28324    pub sue_time: u32,
28325    #[doc = "Serial UDB Extra Status Flags"]
28326    pub sue_flags: u32,
28327    #[doc = "SUE barometer pressure"]
28328    pub sue_barom_press: i32,
28329    #[doc = "SUE barometer altitude"]
28330    pub sue_barom_alt: i32,
28331    #[doc = "Serial UDB Extra PWM Input Channel 1"]
28332    pub sue_pwm_input_1: i16,
28333    #[doc = "Serial UDB Extra PWM Input Channel 2"]
28334    pub sue_pwm_input_2: i16,
28335    #[doc = "Serial UDB Extra PWM Input Channel 3"]
28336    pub sue_pwm_input_3: i16,
28337    #[doc = "Serial UDB Extra PWM Input Channel 4"]
28338    pub sue_pwm_input_4: i16,
28339    #[doc = "Serial UDB Extra PWM Input Channel 5"]
28340    pub sue_pwm_input_5: i16,
28341    #[doc = "Serial UDB Extra PWM Input Channel 6"]
28342    pub sue_pwm_input_6: i16,
28343    #[doc = "Serial UDB Extra PWM Input Channel 7"]
28344    pub sue_pwm_input_7: i16,
28345    #[doc = "Serial UDB Extra PWM Input Channel 8"]
28346    pub sue_pwm_input_8: i16,
28347    #[doc = "Serial UDB Extra PWM Input Channel 9"]
28348    pub sue_pwm_input_9: i16,
28349    #[doc = "Serial UDB Extra PWM Input Channel 10"]
28350    pub sue_pwm_input_10: i16,
28351    #[doc = "Serial UDB Extra PWM Input Channel 11"]
28352    pub sue_pwm_input_11: i16,
28353    #[doc = "Serial UDB Extra PWM Input Channel 12"]
28354    pub sue_pwm_input_12: i16,
28355    #[doc = "Serial UDB Extra PWM Output Channel 1"]
28356    pub sue_pwm_output_1: i16,
28357    #[doc = "Serial UDB Extra PWM Output Channel 2"]
28358    pub sue_pwm_output_2: i16,
28359    #[doc = "Serial UDB Extra PWM Output Channel 3"]
28360    pub sue_pwm_output_3: i16,
28361    #[doc = "Serial UDB Extra PWM Output Channel 4"]
28362    pub sue_pwm_output_4: i16,
28363    #[doc = "Serial UDB Extra PWM Output Channel 5"]
28364    pub sue_pwm_output_5: i16,
28365    #[doc = "Serial UDB Extra PWM Output Channel 6"]
28366    pub sue_pwm_output_6: i16,
28367    #[doc = "Serial UDB Extra PWM Output Channel 7"]
28368    pub sue_pwm_output_7: i16,
28369    #[doc = "Serial UDB Extra PWM Output Channel 8"]
28370    pub sue_pwm_output_8: i16,
28371    #[doc = "Serial UDB Extra PWM Output Channel 9"]
28372    pub sue_pwm_output_9: i16,
28373    #[doc = "Serial UDB Extra PWM Output Channel 10"]
28374    pub sue_pwm_output_10: i16,
28375    #[doc = "Serial UDB Extra PWM Output Channel 11"]
28376    pub sue_pwm_output_11: i16,
28377    #[doc = "Serial UDB Extra PWM Output Channel 12"]
28378    pub sue_pwm_output_12: i16,
28379    #[doc = "Serial UDB Extra IMU Location X"]
28380    pub sue_imu_location_x: i16,
28381    #[doc = "Serial UDB Extra IMU Location Y"]
28382    pub sue_imu_location_y: i16,
28383    #[doc = "Serial UDB Extra IMU Location Z"]
28384    pub sue_imu_location_z: i16,
28385    #[doc = "Serial UDB Location Error Earth X"]
28386    pub sue_location_error_earth_x: i16,
28387    #[doc = "Serial UDB Location Error Earth Y"]
28388    pub sue_location_error_earth_y: i16,
28389    #[doc = "Serial UDB Location Error Earth Z"]
28390    pub sue_location_error_earth_z: i16,
28391    #[doc = "Serial UDB Extra Oscillator Failure Count"]
28392    pub sue_osc_fails: i16,
28393    #[doc = "Serial UDB Extra IMU Velocity X"]
28394    pub sue_imu_velocity_x: i16,
28395    #[doc = "Serial UDB Extra IMU Velocity Y"]
28396    pub sue_imu_velocity_y: i16,
28397    #[doc = "Serial UDB Extra IMU Velocity Z"]
28398    pub sue_imu_velocity_z: i16,
28399    #[doc = "Serial UDB Extra Current Waypoint Goal X"]
28400    pub sue_waypoint_goal_x: i16,
28401    #[doc = "Serial UDB Extra Current Waypoint Goal Y"]
28402    pub sue_waypoint_goal_y: i16,
28403    #[doc = "Serial UDB Extra Current Waypoint Goal Z"]
28404    pub sue_waypoint_goal_z: i16,
28405    #[doc = "Aeroforce in UDB X Axis"]
28406    pub sue_aero_x: i16,
28407    #[doc = "Aeroforce in UDB Y Axis"]
28408    pub sue_aero_y: i16,
28409    #[doc = "Aeroforce in UDB Z axis"]
28410    pub sue_aero_z: i16,
28411    #[doc = "SUE barometer temperature"]
28412    pub sue_barom_temp: i16,
28413    #[doc = "SUE battery voltage"]
28414    pub sue_bat_volt: i16,
28415    #[doc = "SUE battery current"]
28416    pub sue_bat_amp: i16,
28417    #[doc = "SUE battery milli amp hours used"]
28418    pub sue_bat_amp_hours: i16,
28419    #[doc = "Sue autopilot desired height"]
28420    pub sue_desired_height: i16,
28421    #[doc = "Serial UDB Extra Stack Memory Free"]
28422    pub sue_memory_stack_free: i16,
28423}
28424impl SERIAL_UDB_EXTRA_F2_B_DATA {
28425    pub const ENCODED_LEN: usize = 108usize;
28426    pub const DEFAULT: Self = Self {
28427        sue_time: 0_u32,
28428        sue_flags: 0_u32,
28429        sue_barom_press: 0_i32,
28430        sue_barom_alt: 0_i32,
28431        sue_pwm_input_1: 0_i16,
28432        sue_pwm_input_2: 0_i16,
28433        sue_pwm_input_3: 0_i16,
28434        sue_pwm_input_4: 0_i16,
28435        sue_pwm_input_5: 0_i16,
28436        sue_pwm_input_6: 0_i16,
28437        sue_pwm_input_7: 0_i16,
28438        sue_pwm_input_8: 0_i16,
28439        sue_pwm_input_9: 0_i16,
28440        sue_pwm_input_10: 0_i16,
28441        sue_pwm_input_11: 0_i16,
28442        sue_pwm_input_12: 0_i16,
28443        sue_pwm_output_1: 0_i16,
28444        sue_pwm_output_2: 0_i16,
28445        sue_pwm_output_3: 0_i16,
28446        sue_pwm_output_4: 0_i16,
28447        sue_pwm_output_5: 0_i16,
28448        sue_pwm_output_6: 0_i16,
28449        sue_pwm_output_7: 0_i16,
28450        sue_pwm_output_8: 0_i16,
28451        sue_pwm_output_9: 0_i16,
28452        sue_pwm_output_10: 0_i16,
28453        sue_pwm_output_11: 0_i16,
28454        sue_pwm_output_12: 0_i16,
28455        sue_imu_location_x: 0_i16,
28456        sue_imu_location_y: 0_i16,
28457        sue_imu_location_z: 0_i16,
28458        sue_location_error_earth_x: 0_i16,
28459        sue_location_error_earth_y: 0_i16,
28460        sue_location_error_earth_z: 0_i16,
28461        sue_osc_fails: 0_i16,
28462        sue_imu_velocity_x: 0_i16,
28463        sue_imu_velocity_y: 0_i16,
28464        sue_imu_velocity_z: 0_i16,
28465        sue_waypoint_goal_x: 0_i16,
28466        sue_waypoint_goal_y: 0_i16,
28467        sue_waypoint_goal_z: 0_i16,
28468        sue_aero_x: 0_i16,
28469        sue_aero_y: 0_i16,
28470        sue_aero_z: 0_i16,
28471        sue_barom_temp: 0_i16,
28472        sue_bat_volt: 0_i16,
28473        sue_bat_amp: 0_i16,
28474        sue_bat_amp_hours: 0_i16,
28475        sue_desired_height: 0_i16,
28476        sue_memory_stack_free: 0_i16,
28477    };
28478    #[cfg(feature = "arbitrary")]
28479    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28480        use arbitrary::{Arbitrary, Unstructured};
28481        let mut buf = [0u8; 1024];
28482        rng.fill_bytes(&mut buf);
28483        let mut unstructured = Unstructured::new(&buf);
28484        Self::arbitrary(&mut unstructured).unwrap_or_default()
28485    }
28486}
28487impl Default for SERIAL_UDB_EXTRA_F2_B_DATA {
28488    fn default() -> Self {
28489        Self::DEFAULT.clone()
28490    }
28491}
28492impl MessageData for SERIAL_UDB_EXTRA_F2_B_DATA {
28493    type Message = MavMessage;
28494    const ID: u32 = 171u32;
28495    const NAME: &'static str = "SERIAL_UDB_EXTRA_F2_B";
28496    const EXTRA_CRC: u8 = 245u8;
28497    const ENCODED_LEN: usize = 108usize;
28498    fn deser(
28499        _version: MavlinkVersion,
28500        __input: &[u8],
28501    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28502        let avail_len = __input.len();
28503        let mut payload_buf = [0; Self::ENCODED_LEN];
28504        let mut buf = if avail_len < Self::ENCODED_LEN {
28505            payload_buf[0..avail_len].copy_from_slice(__input);
28506            Bytes::new(&payload_buf)
28507        } else {
28508            Bytes::new(__input)
28509        };
28510        let mut __struct = Self::default();
28511        __struct.sue_time = buf.get_u32_le();
28512        __struct.sue_flags = buf.get_u32_le();
28513        __struct.sue_barom_press = buf.get_i32_le();
28514        __struct.sue_barom_alt = buf.get_i32_le();
28515        __struct.sue_pwm_input_1 = buf.get_i16_le();
28516        __struct.sue_pwm_input_2 = buf.get_i16_le();
28517        __struct.sue_pwm_input_3 = buf.get_i16_le();
28518        __struct.sue_pwm_input_4 = buf.get_i16_le();
28519        __struct.sue_pwm_input_5 = buf.get_i16_le();
28520        __struct.sue_pwm_input_6 = buf.get_i16_le();
28521        __struct.sue_pwm_input_7 = buf.get_i16_le();
28522        __struct.sue_pwm_input_8 = buf.get_i16_le();
28523        __struct.sue_pwm_input_9 = buf.get_i16_le();
28524        __struct.sue_pwm_input_10 = buf.get_i16_le();
28525        __struct.sue_pwm_input_11 = buf.get_i16_le();
28526        __struct.sue_pwm_input_12 = buf.get_i16_le();
28527        __struct.sue_pwm_output_1 = buf.get_i16_le();
28528        __struct.sue_pwm_output_2 = buf.get_i16_le();
28529        __struct.sue_pwm_output_3 = buf.get_i16_le();
28530        __struct.sue_pwm_output_4 = buf.get_i16_le();
28531        __struct.sue_pwm_output_5 = buf.get_i16_le();
28532        __struct.sue_pwm_output_6 = buf.get_i16_le();
28533        __struct.sue_pwm_output_7 = buf.get_i16_le();
28534        __struct.sue_pwm_output_8 = buf.get_i16_le();
28535        __struct.sue_pwm_output_9 = buf.get_i16_le();
28536        __struct.sue_pwm_output_10 = buf.get_i16_le();
28537        __struct.sue_pwm_output_11 = buf.get_i16_le();
28538        __struct.sue_pwm_output_12 = buf.get_i16_le();
28539        __struct.sue_imu_location_x = buf.get_i16_le();
28540        __struct.sue_imu_location_y = buf.get_i16_le();
28541        __struct.sue_imu_location_z = buf.get_i16_le();
28542        __struct.sue_location_error_earth_x = buf.get_i16_le();
28543        __struct.sue_location_error_earth_y = buf.get_i16_le();
28544        __struct.sue_location_error_earth_z = buf.get_i16_le();
28545        __struct.sue_osc_fails = buf.get_i16_le();
28546        __struct.sue_imu_velocity_x = buf.get_i16_le();
28547        __struct.sue_imu_velocity_y = buf.get_i16_le();
28548        __struct.sue_imu_velocity_z = buf.get_i16_le();
28549        __struct.sue_waypoint_goal_x = buf.get_i16_le();
28550        __struct.sue_waypoint_goal_y = buf.get_i16_le();
28551        __struct.sue_waypoint_goal_z = buf.get_i16_le();
28552        __struct.sue_aero_x = buf.get_i16_le();
28553        __struct.sue_aero_y = buf.get_i16_le();
28554        __struct.sue_aero_z = buf.get_i16_le();
28555        __struct.sue_barom_temp = buf.get_i16_le();
28556        __struct.sue_bat_volt = buf.get_i16_le();
28557        __struct.sue_bat_amp = buf.get_i16_le();
28558        __struct.sue_bat_amp_hours = buf.get_i16_le();
28559        __struct.sue_desired_height = buf.get_i16_le();
28560        __struct.sue_memory_stack_free = buf.get_i16_le();
28561        Ok(__struct)
28562    }
28563    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28564        let mut __tmp = BytesMut::new(bytes);
28565        #[allow(clippy::absurd_extreme_comparisons)]
28566        #[allow(unused_comparisons)]
28567        if __tmp.remaining() < Self::ENCODED_LEN {
28568            panic!(
28569                "buffer is too small (need {} bytes, but got {})",
28570                Self::ENCODED_LEN,
28571                __tmp.remaining(),
28572            )
28573        }
28574        __tmp.put_u32_le(self.sue_time);
28575        __tmp.put_u32_le(self.sue_flags);
28576        __tmp.put_i32_le(self.sue_barom_press);
28577        __tmp.put_i32_le(self.sue_barom_alt);
28578        __tmp.put_i16_le(self.sue_pwm_input_1);
28579        __tmp.put_i16_le(self.sue_pwm_input_2);
28580        __tmp.put_i16_le(self.sue_pwm_input_3);
28581        __tmp.put_i16_le(self.sue_pwm_input_4);
28582        __tmp.put_i16_le(self.sue_pwm_input_5);
28583        __tmp.put_i16_le(self.sue_pwm_input_6);
28584        __tmp.put_i16_le(self.sue_pwm_input_7);
28585        __tmp.put_i16_le(self.sue_pwm_input_8);
28586        __tmp.put_i16_le(self.sue_pwm_input_9);
28587        __tmp.put_i16_le(self.sue_pwm_input_10);
28588        __tmp.put_i16_le(self.sue_pwm_input_11);
28589        __tmp.put_i16_le(self.sue_pwm_input_12);
28590        __tmp.put_i16_le(self.sue_pwm_output_1);
28591        __tmp.put_i16_le(self.sue_pwm_output_2);
28592        __tmp.put_i16_le(self.sue_pwm_output_3);
28593        __tmp.put_i16_le(self.sue_pwm_output_4);
28594        __tmp.put_i16_le(self.sue_pwm_output_5);
28595        __tmp.put_i16_le(self.sue_pwm_output_6);
28596        __tmp.put_i16_le(self.sue_pwm_output_7);
28597        __tmp.put_i16_le(self.sue_pwm_output_8);
28598        __tmp.put_i16_le(self.sue_pwm_output_9);
28599        __tmp.put_i16_le(self.sue_pwm_output_10);
28600        __tmp.put_i16_le(self.sue_pwm_output_11);
28601        __tmp.put_i16_le(self.sue_pwm_output_12);
28602        __tmp.put_i16_le(self.sue_imu_location_x);
28603        __tmp.put_i16_le(self.sue_imu_location_y);
28604        __tmp.put_i16_le(self.sue_imu_location_z);
28605        __tmp.put_i16_le(self.sue_location_error_earth_x);
28606        __tmp.put_i16_le(self.sue_location_error_earth_y);
28607        __tmp.put_i16_le(self.sue_location_error_earth_z);
28608        __tmp.put_i16_le(self.sue_osc_fails);
28609        __tmp.put_i16_le(self.sue_imu_velocity_x);
28610        __tmp.put_i16_le(self.sue_imu_velocity_y);
28611        __tmp.put_i16_le(self.sue_imu_velocity_z);
28612        __tmp.put_i16_le(self.sue_waypoint_goal_x);
28613        __tmp.put_i16_le(self.sue_waypoint_goal_y);
28614        __tmp.put_i16_le(self.sue_waypoint_goal_z);
28615        __tmp.put_i16_le(self.sue_aero_x);
28616        __tmp.put_i16_le(self.sue_aero_y);
28617        __tmp.put_i16_le(self.sue_aero_z);
28618        __tmp.put_i16_le(self.sue_barom_temp);
28619        __tmp.put_i16_le(self.sue_bat_volt);
28620        __tmp.put_i16_le(self.sue_bat_amp);
28621        __tmp.put_i16_le(self.sue_bat_amp_hours);
28622        __tmp.put_i16_le(self.sue_desired_height);
28623        __tmp.put_i16_le(self.sue_memory_stack_free);
28624        if matches!(version, MavlinkVersion::V2) {
28625            let len = __tmp.len();
28626            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28627        } else {
28628            __tmp.len()
28629        }
28630    }
28631}
28632#[doc = "id: 172"]
28633#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F4: format."]
28634#[derive(Debug, Clone, PartialEq)]
28635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28637pub struct SERIAL_UDB_EXTRA_F4_DATA {
28638    #[doc = "Serial UDB Extra Roll Stabilization with Ailerons Enabled"]
28639    pub sue_ROLL_STABILIZATION_AILERONS: u8,
28640    #[doc = "Serial UDB Extra Roll Stabilization with Rudder Enabled"]
28641    pub sue_ROLL_STABILIZATION_RUDDER: u8,
28642    #[doc = "Serial UDB Extra Pitch Stabilization Enabled"]
28643    pub sue_PITCH_STABILIZATION: u8,
28644    #[doc = "Serial UDB Extra Yaw Stabilization using Rudder Enabled"]
28645    pub sue_YAW_STABILIZATION_RUDDER: u8,
28646    #[doc = "Serial UDB Extra Yaw Stabilization using Ailerons Enabled"]
28647    pub sue_YAW_STABILIZATION_AILERON: u8,
28648    #[doc = "Serial UDB Extra Navigation with Ailerons Enabled"]
28649    pub sue_AILERON_NAVIGATION: u8,
28650    #[doc = "Serial UDB Extra Navigation with Rudder Enabled"]
28651    pub sue_RUDDER_NAVIGATION: u8,
28652    #[doc = "Serial UDB Extra Type of Alitude Hold when in Stabilized Mode"]
28653    pub sue_ALTITUDEHOLD_STABILIZED: u8,
28654    #[doc = "Serial UDB Extra Type of Alitude Hold when in Waypoint Mode"]
28655    pub sue_ALTITUDEHOLD_WAYPOINT: u8,
28656    #[doc = "Serial UDB Extra Firmware racing mode enabled"]
28657    pub sue_RACING_MODE: u8,
28658}
28659impl SERIAL_UDB_EXTRA_F4_DATA {
28660    pub const ENCODED_LEN: usize = 10usize;
28661    pub const DEFAULT: Self = Self {
28662        sue_ROLL_STABILIZATION_AILERONS: 0_u8,
28663        sue_ROLL_STABILIZATION_RUDDER: 0_u8,
28664        sue_PITCH_STABILIZATION: 0_u8,
28665        sue_YAW_STABILIZATION_RUDDER: 0_u8,
28666        sue_YAW_STABILIZATION_AILERON: 0_u8,
28667        sue_AILERON_NAVIGATION: 0_u8,
28668        sue_RUDDER_NAVIGATION: 0_u8,
28669        sue_ALTITUDEHOLD_STABILIZED: 0_u8,
28670        sue_ALTITUDEHOLD_WAYPOINT: 0_u8,
28671        sue_RACING_MODE: 0_u8,
28672    };
28673    #[cfg(feature = "arbitrary")]
28674    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28675        use arbitrary::{Arbitrary, Unstructured};
28676        let mut buf = [0u8; 1024];
28677        rng.fill_bytes(&mut buf);
28678        let mut unstructured = Unstructured::new(&buf);
28679        Self::arbitrary(&mut unstructured).unwrap_or_default()
28680    }
28681}
28682impl Default for SERIAL_UDB_EXTRA_F4_DATA {
28683    fn default() -> Self {
28684        Self::DEFAULT.clone()
28685    }
28686}
28687impl MessageData for SERIAL_UDB_EXTRA_F4_DATA {
28688    type Message = MavMessage;
28689    const ID: u32 = 172u32;
28690    const NAME: &'static str = "SERIAL_UDB_EXTRA_F4";
28691    const EXTRA_CRC: u8 = 191u8;
28692    const ENCODED_LEN: usize = 10usize;
28693    fn deser(
28694        _version: MavlinkVersion,
28695        __input: &[u8],
28696    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28697        let avail_len = __input.len();
28698        let mut payload_buf = [0; Self::ENCODED_LEN];
28699        let mut buf = if avail_len < Self::ENCODED_LEN {
28700            payload_buf[0..avail_len].copy_from_slice(__input);
28701            Bytes::new(&payload_buf)
28702        } else {
28703            Bytes::new(__input)
28704        };
28705        let mut __struct = Self::default();
28706        __struct.sue_ROLL_STABILIZATION_AILERONS = buf.get_u8();
28707        __struct.sue_ROLL_STABILIZATION_RUDDER = buf.get_u8();
28708        __struct.sue_PITCH_STABILIZATION = buf.get_u8();
28709        __struct.sue_YAW_STABILIZATION_RUDDER = buf.get_u8();
28710        __struct.sue_YAW_STABILIZATION_AILERON = buf.get_u8();
28711        __struct.sue_AILERON_NAVIGATION = buf.get_u8();
28712        __struct.sue_RUDDER_NAVIGATION = buf.get_u8();
28713        __struct.sue_ALTITUDEHOLD_STABILIZED = buf.get_u8();
28714        __struct.sue_ALTITUDEHOLD_WAYPOINT = buf.get_u8();
28715        __struct.sue_RACING_MODE = buf.get_u8();
28716        Ok(__struct)
28717    }
28718    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28719        let mut __tmp = BytesMut::new(bytes);
28720        #[allow(clippy::absurd_extreme_comparisons)]
28721        #[allow(unused_comparisons)]
28722        if __tmp.remaining() < Self::ENCODED_LEN {
28723            panic!(
28724                "buffer is too small (need {} bytes, but got {})",
28725                Self::ENCODED_LEN,
28726                __tmp.remaining(),
28727            )
28728        }
28729        __tmp.put_u8(self.sue_ROLL_STABILIZATION_AILERONS);
28730        __tmp.put_u8(self.sue_ROLL_STABILIZATION_RUDDER);
28731        __tmp.put_u8(self.sue_PITCH_STABILIZATION);
28732        __tmp.put_u8(self.sue_YAW_STABILIZATION_RUDDER);
28733        __tmp.put_u8(self.sue_YAW_STABILIZATION_AILERON);
28734        __tmp.put_u8(self.sue_AILERON_NAVIGATION);
28735        __tmp.put_u8(self.sue_RUDDER_NAVIGATION);
28736        __tmp.put_u8(self.sue_ALTITUDEHOLD_STABILIZED);
28737        __tmp.put_u8(self.sue_ALTITUDEHOLD_WAYPOINT);
28738        __tmp.put_u8(self.sue_RACING_MODE);
28739        if matches!(version, MavlinkVersion::V2) {
28740            let len = __tmp.len();
28741            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28742        } else {
28743            __tmp.len()
28744        }
28745    }
28746}
28747#[doc = "id: 173"]
28748#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F5: format."]
28749#[derive(Debug, Clone, PartialEq)]
28750#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28751#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28752pub struct SERIAL_UDB_EXTRA_F5_DATA {
28753    #[doc = "Serial UDB YAWKP_AILERON Gain for Proporional control of navigation"]
28754    pub sue_YAWKP_AILERON: f32,
28755    #[doc = "Serial UDB YAWKD_AILERON Gain for Rate control of navigation"]
28756    pub sue_YAWKD_AILERON: f32,
28757    #[doc = "Serial UDB Extra ROLLKP Gain for Proportional control of roll stabilization"]
28758    pub sue_ROLLKP: f32,
28759    #[doc = "Serial UDB Extra ROLLKD Gain for Rate control of roll stabilization"]
28760    pub sue_ROLLKD: f32,
28761}
28762impl SERIAL_UDB_EXTRA_F5_DATA {
28763    pub const ENCODED_LEN: usize = 16usize;
28764    pub const DEFAULT: Self = Self {
28765        sue_YAWKP_AILERON: 0.0_f32,
28766        sue_YAWKD_AILERON: 0.0_f32,
28767        sue_ROLLKP: 0.0_f32,
28768        sue_ROLLKD: 0.0_f32,
28769    };
28770    #[cfg(feature = "arbitrary")]
28771    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28772        use arbitrary::{Arbitrary, Unstructured};
28773        let mut buf = [0u8; 1024];
28774        rng.fill_bytes(&mut buf);
28775        let mut unstructured = Unstructured::new(&buf);
28776        Self::arbitrary(&mut unstructured).unwrap_or_default()
28777    }
28778}
28779impl Default for SERIAL_UDB_EXTRA_F5_DATA {
28780    fn default() -> Self {
28781        Self::DEFAULT.clone()
28782    }
28783}
28784impl MessageData for SERIAL_UDB_EXTRA_F5_DATA {
28785    type Message = MavMessage;
28786    const ID: u32 = 173u32;
28787    const NAME: &'static str = "SERIAL_UDB_EXTRA_F5";
28788    const EXTRA_CRC: u8 = 54u8;
28789    const ENCODED_LEN: usize = 16usize;
28790    fn deser(
28791        _version: MavlinkVersion,
28792        __input: &[u8],
28793    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28794        let avail_len = __input.len();
28795        let mut payload_buf = [0; Self::ENCODED_LEN];
28796        let mut buf = if avail_len < Self::ENCODED_LEN {
28797            payload_buf[0..avail_len].copy_from_slice(__input);
28798            Bytes::new(&payload_buf)
28799        } else {
28800            Bytes::new(__input)
28801        };
28802        let mut __struct = Self::default();
28803        __struct.sue_YAWKP_AILERON = buf.get_f32_le();
28804        __struct.sue_YAWKD_AILERON = buf.get_f32_le();
28805        __struct.sue_ROLLKP = buf.get_f32_le();
28806        __struct.sue_ROLLKD = buf.get_f32_le();
28807        Ok(__struct)
28808    }
28809    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28810        let mut __tmp = BytesMut::new(bytes);
28811        #[allow(clippy::absurd_extreme_comparisons)]
28812        #[allow(unused_comparisons)]
28813        if __tmp.remaining() < Self::ENCODED_LEN {
28814            panic!(
28815                "buffer is too small (need {} bytes, but got {})",
28816                Self::ENCODED_LEN,
28817                __tmp.remaining(),
28818            )
28819        }
28820        __tmp.put_f32_le(self.sue_YAWKP_AILERON);
28821        __tmp.put_f32_le(self.sue_YAWKD_AILERON);
28822        __tmp.put_f32_le(self.sue_ROLLKP);
28823        __tmp.put_f32_le(self.sue_ROLLKD);
28824        if matches!(version, MavlinkVersion::V2) {
28825            let len = __tmp.len();
28826            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28827        } else {
28828            __tmp.len()
28829        }
28830    }
28831}
28832#[doc = "id: 174"]
28833#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F6: format."]
28834#[derive(Debug, Clone, PartialEq)]
28835#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28836#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28837pub struct SERIAL_UDB_EXTRA_F6_DATA {
28838    #[doc = "Serial UDB Extra PITCHGAIN Proportional Control"]
28839    pub sue_PITCHGAIN: f32,
28840    #[doc = "Serial UDB Extra Pitch Rate Control"]
28841    pub sue_PITCHKD: f32,
28842    #[doc = "Serial UDB Extra Rudder to Elevator Mix"]
28843    pub sue_RUDDER_ELEV_MIX: f32,
28844    #[doc = "Serial UDB Extra Roll to Elevator Mix"]
28845    pub sue_ROLL_ELEV_MIX: f32,
28846    #[doc = "Gain For Boosting Manual Elevator control When Plane Stabilized"]
28847    pub sue_ELEVATOR_BOOST: f32,
28848}
28849impl SERIAL_UDB_EXTRA_F6_DATA {
28850    pub const ENCODED_LEN: usize = 20usize;
28851    pub const DEFAULT: Self = Self {
28852        sue_PITCHGAIN: 0.0_f32,
28853        sue_PITCHKD: 0.0_f32,
28854        sue_RUDDER_ELEV_MIX: 0.0_f32,
28855        sue_ROLL_ELEV_MIX: 0.0_f32,
28856        sue_ELEVATOR_BOOST: 0.0_f32,
28857    };
28858    #[cfg(feature = "arbitrary")]
28859    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28860        use arbitrary::{Arbitrary, Unstructured};
28861        let mut buf = [0u8; 1024];
28862        rng.fill_bytes(&mut buf);
28863        let mut unstructured = Unstructured::new(&buf);
28864        Self::arbitrary(&mut unstructured).unwrap_or_default()
28865    }
28866}
28867impl Default for SERIAL_UDB_EXTRA_F6_DATA {
28868    fn default() -> Self {
28869        Self::DEFAULT.clone()
28870    }
28871}
28872impl MessageData for SERIAL_UDB_EXTRA_F6_DATA {
28873    type Message = MavMessage;
28874    const ID: u32 = 174u32;
28875    const NAME: &'static str = "SERIAL_UDB_EXTRA_F6";
28876    const EXTRA_CRC: u8 = 54u8;
28877    const ENCODED_LEN: usize = 20usize;
28878    fn deser(
28879        _version: MavlinkVersion,
28880        __input: &[u8],
28881    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28882        let avail_len = __input.len();
28883        let mut payload_buf = [0; Self::ENCODED_LEN];
28884        let mut buf = if avail_len < Self::ENCODED_LEN {
28885            payload_buf[0..avail_len].copy_from_slice(__input);
28886            Bytes::new(&payload_buf)
28887        } else {
28888            Bytes::new(__input)
28889        };
28890        let mut __struct = Self::default();
28891        __struct.sue_PITCHGAIN = buf.get_f32_le();
28892        __struct.sue_PITCHKD = buf.get_f32_le();
28893        __struct.sue_RUDDER_ELEV_MIX = buf.get_f32_le();
28894        __struct.sue_ROLL_ELEV_MIX = buf.get_f32_le();
28895        __struct.sue_ELEVATOR_BOOST = buf.get_f32_le();
28896        Ok(__struct)
28897    }
28898    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28899        let mut __tmp = BytesMut::new(bytes);
28900        #[allow(clippy::absurd_extreme_comparisons)]
28901        #[allow(unused_comparisons)]
28902        if __tmp.remaining() < Self::ENCODED_LEN {
28903            panic!(
28904                "buffer is too small (need {} bytes, but got {})",
28905                Self::ENCODED_LEN,
28906                __tmp.remaining(),
28907            )
28908        }
28909        __tmp.put_f32_le(self.sue_PITCHGAIN);
28910        __tmp.put_f32_le(self.sue_PITCHKD);
28911        __tmp.put_f32_le(self.sue_RUDDER_ELEV_MIX);
28912        __tmp.put_f32_le(self.sue_ROLL_ELEV_MIX);
28913        __tmp.put_f32_le(self.sue_ELEVATOR_BOOST);
28914        if matches!(version, MavlinkVersion::V2) {
28915            let len = __tmp.len();
28916            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28917        } else {
28918            __tmp.len()
28919        }
28920    }
28921}
28922#[doc = "id: 175"]
28923#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F7: format."]
28924#[derive(Debug, Clone, PartialEq)]
28925#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28926#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28927pub struct SERIAL_UDB_EXTRA_F7_DATA {
28928    #[doc = "Serial UDB YAWKP_RUDDER Gain for Proporional control of navigation"]
28929    pub sue_YAWKP_RUDDER: f32,
28930    #[doc = "Serial UDB YAWKD_RUDDER Gain for Rate control of navigation"]
28931    pub sue_YAWKD_RUDDER: f32,
28932    #[doc = "Serial UDB Extra ROLLKP_RUDDER Gain for Proportional control of roll stabilization"]
28933    pub sue_ROLLKP_RUDDER: f32,
28934    #[doc = "Serial UDB Extra ROLLKD_RUDDER Gain for Rate control of roll stabilization"]
28935    pub sue_ROLLKD_RUDDER: f32,
28936    #[doc = "SERIAL UDB EXTRA Rudder Boost Gain to Manual Control when stabilized"]
28937    pub sue_RUDDER_BOOST: f32,
28938    #[doc = "Serial UDB Extra Return To Landing - Angle to Pitch Plane Down"]
28939    pub sue_RTL_PITCH_DOWN: f32,
28940}
28941impl SERIAL_UDB_EXTRA_F7_DATA {
28942    pub const ENCODED_LEN: usize = 24usize;
28943    pub const DEFAULT: Self = Self {
28944        sue_YAWKP_RUDDER: 0.0_f32,
28945        sue_YAWKD_RUDDER: 0.0_f32,
28946        sue_ROLLKP_RUDDER: 0.0_f32,
28947        sue_ROLLKD_RUDDER: 0.0_f32,
28948        sue_RUDDER_BOOST: 0.0_f32,
28949        sue_RTL_PITCH_DOWN: 0.0_f32,
28950    };
28951    #[cfg(feature = "arbitrary")]
28952    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28953        use arbitrary::{Arbitrary, Unstructured};
28954        let mut buf = [0u8; 1024];
28955        rng.fill_bytes(&mut buf);
28956        let mut unstructured = Unstructured::new(&buf);
28957        Self::arbitrary(&mut unstructured).unwrap_or_default()
28958    }
28959}
28960impl Default for SERIAL_UDB_EXTRA_F7_DATA {
28961    fn default() -> Self {
28962        Self::DEFAULT.clone()
28963    }
28964}
28965impl MessageData for SERIAL_UDB_EXTRA_F7_DATA {
28966    type Message = MavMessage;
28967    const ID: u32 = 175u32;
28968    const NAME: &'static str = "SERIAL_UDB_EXTRA_F7";
28969    const EXTRA_CRC: u8 = 171u8;
28970    const ENCODED_LEN: usize = 24usize;
28971    fn deser(
28972        _version: MavlinkVersion,
28973        __input: &[u8],
28974    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28975        let avail_len = __input.len();
28976        let mut payload_buf = [0; Self::ENCODED_LEN];
28977        let mut buf = if avail_len < Self::ENCODED_LEN {
28978            payload_buf[0..avail_len].copy_from_slice(__input);
28979            Bytes::new(&payload_buf)
28980        } else {
28981            Bytes::new(__input)
28982        };
28983        let mut __struct = Self::default();
28984        __struct.sue_YAWKP_RUDDER = buf.get_f32_le();
28985        __struct.sue_YAWKD_RUDDER = buf.get_f32_le();
28986        __struct.sue_ROLLKP_RUDDER = buf.get_f32_le();
28987        __struct.sue_ROLLKD_RUDDER = buf.get_f32_le();
28988        __struct.sue_RUDDER_BOOST = buf.get_f32_le();
28989        __struct.sue_RTL_PITCH_DOWN = buf.get_f32_le();
28990        Ok(__struct)
28991    }
28992    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28993        let mut __tmp = BytesMut::new(bytes);
28994        #[allow(clippy::absurd_extreme_comparisons)]
28995        #[allow(unused_comparisons)]
28996        if __tmp.remaining() < Self::ENCODED_LEN {
28997            panic!(
28998                "buffer is too small (need {} bytes, but got {})",
28999                Self::ENCODED_LEN,
29000                __tmp.remaining(),
29001            )
29002        }
29003        __tmp.put_f32_le(self.sue_YAWKP_RUDDER);
29004        __tmp.put_f32_le(self.sue_YAWKD_RUDDER);
29005        __tmp.put_f32_le(self.sue_ROLLKP_RUDDER);
29006        __tmp.put_f32_le(self.sue_ROLLKD_RUDDER);
29007        __tmp.put_f32_le(self.sue_RUDDER_BOOST);
29008        __tmp.put_f32_le(self.sue_RTL_PITCH_DOWN);
29009        if matches!(version, MavlinkVersion::V2) {
29010            let len = __tmp.len();
29011            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29012        } else {
29013            __tmp.len()
29014        }
29015    }
29016}
29017#[doc = "id: 176"]
29018#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F8: format."]
29019#[derive(Debug, Clone, PartialEq)]
29020#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29021#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29022pub struct SERIAL_UDB_EXTRA_F8_DATA {
29023    #[doc = "Serial UDB Extra HEIGHT_TARGET_MAX"]
29024    pub sue_HEIGHT_TARGET_MAX: f32,
29025    #[doc = "Serial UDB Extra HEIGHT_TARGET_MIN"]
29026    pub sue_HEIGHT_TARGET_MIN: f32,
29027    #[doc = "Serial UDB Extra ALT_HOLD_THROTTLE_MIN"]
29028    pub sue_ALT_HOLD_THROTTLE_MIN: f32,
29029    #[doc = "Serial UDB Extra ALT_HOLD_THROTTLE_MAX"]
29030    pub sue_ALT_HOLD_THROTTLE_MAX: f32,
29031    #[doc = "Serial UDB Extra ALT_HOLD_PITCH_MIN"]
29032    pub sue_ALT_HOLD_PITCH_MIN: f32,
29033    #[doc = "Serial UDB Extra ALT_HOLD_PITCH_MAX"]
29034    pub sue_ALT_HOLD_PITCH_MAX: f32,
29035    #[doc = "Serial UDB Extra ALT_HOLD_PITCH_HIGH"]
29036    pub sue_ALT_HOLD_PITCH_HIGH: f32,
29037}
29038impl SERIAL_UDB_EXTRA_F8_DATA {
29039    pub const ENCODED_LEN: usize = 28usize;
29040    pub const DEFAULT: Self = Self {
29041        sue_HEIGHT_TARGET_MAX: 0.0_f32,
29042        sue_HEIGHT_TARGET_MIN: 0.0_f32,
29043        sue_ALT_HOLD_THROTTLE_MIN: 0.0_f32,
29044        sue_ALT_HOLD_THROTTLE_MAX: 0.0_f32,
29045        sue_ALT_HOLD_PITCH_MIN: 0.0_f32,
29046        sue_ALT_HOLD_PITCH_MAX: 0.0_f32,
29047        sue_ALT_HOLD_PITCH_HIGH: 0.0_f32,
29048    };
29049    #[cfg(feature = "arbitrary")]
29050    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29051        use arbitrary::{Arbitrary, Unstructured};
29052        let mut buf = [0u8; 1024];
29053        rng.fill_bytes(&mut buf);
29054        let mut unstructured = Unstructured::new(&buf);
29055        Self::arbitrary(&mut unstructured).unwrap_or_default()
29056    }
29057}
29058impl Default for SERIAL_UDB_EXTRA_F8_DATA {
29059    fn default() -> Self {
29060        Self::DEFAULT.clone()
29061    }
29062}
29063impl MessageData for SERIAL_UDB_EXTRA_F8_DATA {
29064    type Message = MavMessage;
29065    const ID: u32 = 176u32;
29066    const NAME: &'static str = "SERIAL_UDB_EXTRA_F8";
29067    const EXTRA_CRC: u8 = 142u8;
29068    const ENCODED_LEN: usize = 28usize;
29069    fn deser(
29070        _version: MavlinkVersion,
29071        __input: &[u8],
29072    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29073        let avail_len = __input.len();
29074        let mut payload_buf = [0; Self::ENCODED_LEN];
29075        let mut buf = if avail_len < Self::ENCODED_LEN {
29076            payload_buf[0..avail_len].copy_from_slice(__input);
29077            Bytes::new(&payload_buf)
29078        } else {
29079            Bytes::new(__input)
29080        };
29081        let mut __struct = Self::default();
29082        __struct.sue_HEIGHT_TARGET_MAX = buf.get_f32_le();
29083        __struct.sue_HEIGHT_TARGET_MIN = buf.get_f32_le();
29084        __struct.sue_ALT_HOLD_THROTTLE_MIN = buf.get_f32_le();
29085        __struct.sue_ALT_HOLD_THROTTLE_MAX = buf.get_f32_le();
29086        __struct.sue_ALT_HOLD_PITCH_MIN = buf.get_f32_le();
29087        __struct.sue_ALT_HOLD_PITCH_MAX = buf.get_f32_le();
29088        __struct.sue_ALT_HOLD_PITCH_HIGH = buf.get_f32_le();
29089        Ok(__struct)
29090    }
29091    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29092        let mut __tmp = BytesMut::new(bytes);
29093        #[allow(clippy::absurd_extreme_comparisons)]
29094        #[allow(unused_comparisons)]
29095        if __tmp.remaining() < Self::ENCODED_LEN {
29096            panic!(
29097                "buffer is too small (need {} bytes, but got {})",
29098                Self::ENCODED_LEN,
29099                __tmp.remaining(),
29100            )
29101        }
29102        __tmp.put_f32_le(self.sue_HEIGHT_TARGET_MAX);
29103        __tmp.put_f32_le(self.sue_HEIGHT_TARGET_MIN);
29104        __tmp.put_f32_le(self.sue_ALT_HOLD_THROTTLE_MIN);
29105        __tmp.put_f32_le(self.sue_ALT_HOLD_THROTTLE_MAX);
29106        __tmp.put_f32_le(self.sue_ALT_HOLD_PITCH_MIN);
29107        __tmp.put_f32_le(self.sue_ALT_HOLD_PITCH_MAX);
29108        __tmp.put_f32_le(self.sue_ALT_HOLD_PITCH_HIGH);
29109        if matches!(version, MavlinkVersion::V2) {
29110            let len = __tmp.len();
29111            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29112        } else {
29113            __tmp.len()
29114        }
29115    }
29116}
29117#[doc = "id: 36"]
29118#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
29119#[derive(Debug, Clone, PartialEq)]
29120#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29121#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29122pub struct SERVO_OUTPUT_RAW_DATA {
29123    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29124    pub time_usec: u32,
29125    #[doc = "Servo output 1 value"]
29126    pub servo1_raw: u16,
29127    #[doc = "Servo output 2 value"]
29128    pub servo2_raw: u16,
29129    #[doc = "Servo output 3 value"]
29130    pub servo3_raw: u16,
29131    #[doc = "Servo output 4 value"]
29132    pub servo4_raw: u16,
29133    #[doc = "Servo output 5 value"]
29134    pub servo5_raw: u16,
29135    #[doc = "Servo output 6 value"]
29136    pub servo6_raw: u16,
29137    #[doc = "Servo output 7 value"]
29138    pub servo7_raw: u16,
29139    #[doc = "Servo output 8 value"]
29140    pub servo8_raw: u16,
29141    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
29142    pub port: u8,
29143    #[doc = "Servo output 9 value"]
29144    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29145    pub servo9_raw: u16,
29146    #[doc = "Servo output 10 value"]
29147    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29148    pub servo10_raw: u16,
29149    #[doc = "Servo output 11 value"]
29150    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29151    pub servo11_raw: u16,
29152    #[doc = "Servo output 12 value"]
29153    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29154    pub servo12_raw: u16,
29155    #[doc = "Servo output 13 value"]
29156    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29157    pub servo13_raw: u16,
29158    #[doc = "Servo output 14 value"]
29159    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29160    pub servo14_raw: u16,
29161    #[doc = "Servo output 15 value"]
29162    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29163    pub servo15_raw: u16,
29164    #[doc = "Servo output 16 value"]
29165    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29166    pub servo16_raw: u16,
29167}
29168impl SERVO_OUTPUT_RAW_DATA {
29169    pub const ENCODED_LEN: usize = 37usize;
29170    pub const DEFAULT: Self = Self {
29171        time_usec: 0_u32,
29172        servo1_raw: 0_u16,
29173        servo2_raw: 0_u16,
29174        servo3_raw: 0_u16,
29175        servo4_raw: 0_u16,
29176        servo5_raw: 0_u16,
29177        servo6_raw: 0_u16,
29178        servo7_raw: 0_u16,
29179        servo8_raw: 0_u16,
29180        port: 0_u8,
29181        servo9_raw: 0_u16,
29182        servo10_raw: 0_u16,
29183        servo11_raw: 0_u16,
29184        servo12_raw: 0_u16,
29185        servo13_raw: 0_u16,
29186        servo14_raw: 0_u16,
29187        servo15_raw: 0_u16,
29188        servo16_raw: 0_u16,
29189    };
29190    #[cfg(feature = "arbitrary")]
29191    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29192        use arbitrary::{Arbitrary, Unstructured};
29193        let mut buf = [0u8; 1024];
29194        rng.fill_bytes(&mut buf);
29195        let mut unstructured = Unstructured::new(&buf);
29196        Self::arbitrary(&mut unstructured).unwrap_or_default()
29197    }
29198}
29199impl Default for SERVO_OUTPUT_RAW_DATA {
29200    fn default() -> Self {
29201        Self::DEFAULT.clone()
29202    }
29203}
29204impl MessageData for SERVO_OUTPUT_RAW_DATA {
29205    type Message = MavMessage;
29206    const ID: u32 = 36u32;
29207    const NAME: &'static str = "SERVO_OUTPUT_RAW";
29208    const EXTRA_CRC: u8 = 222u8;
29209    const ENCODED_LEN: usize = 37usize;
29210    fn deser(
29211        _version: MavlinkVersion,
29212        __input: &[u8],
29213    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29214        let avail_len = __input.len();
29215        let mut payload_buf = [0; Self::ENCODED_LEN];
29216        let mut buf = if avail_len < Self::ENCODED_LEN {
29217            payload_buf[0..avail_len].copy_from_slice(__input);
29218            Bytes::new(&payload_buf)
29219        } else {
29220            Bytes::new(__input)
29221        };
29222        let mut __struct = Self::default();
29223        __struct.time_usec = buf.get_u32_le();
29224        __struct.servo1_raw = buf.get_u16_le();
29225        __struct.servo2_raw = buf.get_u16_le();
29226        __struct.servo3_raw = buf.get_u16_le();
29227        __struct.servo4_raw = buf.get_u16_le();
29228        __struct.servo5_raw = buf.get_u16_le();
29229        __struct.servo6_raw = buf.get_u16_le();
29230        __struct.servo7_raw = buf.get_u16_le();
29231        __struct.servo8_raw = buf.get_u16_le();
29232        __struct.port = buf.get_u8();
29233        __struct.servo9_raw = buf.get_u16_le();
29234        __struct.servo10_raw = buf.get_u16_le();
29235        __struct.servo11_raw = buf.get_u16_le();
29236        __struct.servo12_raw = buf.get_u16_le();
29237        __struct.servo13_raw = buf.get_u16_le();
29238        __struct.servo14_raw = buf.get_u16_le();
29239        __struct.servo15_raw = buf.get_u16_le();
29240        __struct.servo16_raw = buf.get_u16_le();
29241        Ok(__struct)
29242    }
29243    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29244        let mut __tmp = BytesMut::new(bytes);
29245        #[allow(clippy::absurd_extreme_comparisons)]
29246        #[allow(unused_comparisons)]
29247        if __tmp.remaining() < Self::ENCODED_LEN {
29248            panic!(
29249                "buffer is too small (need {} bytes, but got {})",
29250                Self::ENCODED_LEN,
29251                __tmp.remaining(),
29252            )
29253        }
29254        __tmp.put_u32_le(self.time_usec);
29255        __tmp.put_u16_le(self.servo1_raw);
29256        __tmp.put_u16_le(self.servo2_raw);
29257        __tmp.put_u16_le(self.servo3_raw);
29258        __tmp.put_u16_le(self.servo4_raw);
29259        __tmp.put_u16_le(self.servo5_raw);
29260        __tmp.put_u16_le(self.servo6_raw);
29261        __tmp.put_u16_le(self.servo7_raw);
29262        __tmp.put_u16_le(self.servo8_raw);
29263        __tmp.put_u8(self.port);
29264        __tmp.put_u16_le(self.servo9_raw);
29265        __tmp.put_u16_le(self.servo10_raw);
29266        __tmp.put_u16_le(self.servo11_raw);
29267        __tmp.put_u16_le(self.servo12_raw);
29268        __tmp.put_u16_le(self.servo13_raw);
29269        __tmp.put_u16_le(self.servo14_raw);
29270        __tmp.put_u16_le(self.servo15_raw);
29271        __tmp.put_u16_le(self.servo16_raw);
29272        if matches!(version, MavlinkVersion::V2) {
29273            let len = __tmp.len();
29274            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29275        } else {
29276            __tmp.len()
29277        }
29278    }
29279}
29280#[doc = "id: 256"]
29281#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
29282#[derive(Debug, Clone, PartialEq)]
29283#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29284#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29285pub struct SETUP_SIGNING_DATA {
29286    #[doc = "initial timestamp"]
29287    pub initial_timestamp: u64,
29288    #[doc = "system id of the target"]
29289    pub target_system: u8,
29290    #[doc = "component ID of the target"]
29291    pub target_component: u8,
29292    #[doc = "signing key"]
29293    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29294    pub secret_key: [u8; 32],
29295}
29296impl SETUP_SIGNING_DATA {
29297    pub const ENCODED_LEN: usize = 42usize;
29298    pub const DEFAULT: Self = Self {
29299        initial_timestamp: 0_u64,
29300        target_system: 0_u8,
29301        target_component: 0_u8,
29302        secret_key: [0_u8; 32usize],
29303    };
29304    #[cfg(feature = "arbitrary")]
29305    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29306        use arbitrary::{Arbitrary, Unstructured};
29307        let mut buf = [0u8; 1024];
29308        rng.fill_bytes(&mut buf);
29309        let mut unstructured = Unstructured::new(&buf);
29310        Self::arbitrary(&mut unstructured).unwrap_or_default()
29311    }
29312}
29313impl Default for SETUP_SIGNING_DATA {
29314    fn default() -> Self {
29315        Self::DEFAULT.clone()
29316    }
29317}
29318impl MessageData for SETUP_SIGNING_DATA {
29319    type Message = MavMessage;
29320    const ID: u32 = 256u32;
29321    const NAME: &'static str = "SETUP_SIGNING";
29322    const EXTRA_CRC: u8 = 71u8;
29323    const ENCODED_LEN: usize = 42usize;
29324    fn deser(
29325        _version: MavlinkVersion,
29326        __input: &[u8],
29327    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29328        let avail_len = __input.len();
29329        let mut payload_buf = [0; Self::ENCODED_LEN];
29330        let mut buf = if avail_len < Self::ENCODED_LEN {
29331            payload_buf[0..avail_len].copy_from_slice(__input);
29332            Bytes::new(&payload_buf)
29333        } else {
29334            Bytes::new(__input)
29335        };
29336        let mut __struct = Self::default();
29337        __struct.initial_timestamp = buf.get_u64_le();
29338        __struct.target_system = buf.get_u8();
29339        __struct.target_component = buf.get_u8();
29340        for v in &mut __struct.secret_key {
29341            let val = buf.get_u8();
29342            *v = val;
29343        }
29344        Ok(__struct)
29345    }
29346    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29347        let mut __tmp = BytesMut::new(bytes);
29348        #[allow(clippy::absurd_extreme_comparisons)]
29349        #[allow(unused_comparisons)]
29350        if __tmp.remaining() < Self::ENCODED_LEN {
29351            panic!(
29352                "buffer is too small (need {} bytes, but got {})",
29353                Self::ENCODED_LEN,
29354                __tmp.remaining(),
29355            )
29356        }
29357        __tmp.put_u64_le(self.initial_timestamp);
29358        __tmp.put_u8(self.target_system);
29359        __tmp.put_u8(self.target_component);
29360        for val in &self.secret_key {
29361            __tmp.put_u8(*val);
29362        }
29363        if matches!(version, MavlinkVersion::V2) {
29364            let len = __tmp.len();
29365            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29366        } else {
29367            __tmp.len()
29368        }
29369    }
29370}
29371#[doc = "id: 139"]
29372#[doc = "Set the vehicle attitude and body angular rates."]
29373#[derive(Debug, Clone, PartialEq)]
29374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29375#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29376pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
29377    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29378    pub time_usec: u64,
29379    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
29380    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29381    pub controls: [f32; 8],
29382    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
29383    pub group_mlx: u8,
29384    #[doc = "System ID"]
29385    pub target_system: u8,
29386    #[doc = "Component ID"]
29387    pub target_component: u8,
29388}
29389impl SET_ACTUATOR_CONTROL_TARGET_DATA {
29390    pub const ENCODED_LEN: usize = 43usize;
29391    pub const DEFAULT: Self = Self {
29392        time_usec: 0_u64,
29393        controls: [0.0_f32; 8usize],
29394        group_mlx: 0_u8,
29395        target_system: 0_u8,
29396        target_component: 0_u8,
29397    };
29398    #[cfg(feature = "arbitrary")]
29399    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29400        use arbitrary::{Arbitrary, Unstructured};
29401        let mut buf = [0u8; 1024];
29402        rng.fill_bytes(&mut buf);
29403        let mut unstructured = Unstructured::new(&buf);
29404        Self::arbitrary(&mut unstructured).unwrap_or_default()
29405    }
29406}
29407impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
29408    fn default() -> Self {
29409        Self::DEFAULT.clone()
29410    }
29411}
29412impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
29413    type Message = MavMessage;
29414    const ID: u32 = 139u32;
29415    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
29416    const EXTRA_CRC: u8 = 168u8;
29417    const ENCODED_LEN: usize = 43usize;
29418    fn deser(
29419        _version: MavlinkVersion,
29420        __input: &[u8],
29421    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29422        let avail_len = __input.len();
29423        let mut payload_buf = [0; Self::ENCODED_LEN];
29424        let mut buf = if avail_len < Self::ENCODED_LEN {
29425            payload_buf[0..avail_len].copy_from_slice(__input);
29426            Bytes::new(&payload_buf)
29427        } else {
29428            Bytes::new(__input)
29429        };
29430        let mut __struct = Self::default();
29431        __struct.time_usec = buf.get_u64_le();
29432        for v in &mut __struct.controls {
29433            let val = buf.get_f32_le();
29434            *v = val;
29435        }
29436        __struct.group_mlx = buf.get_u8();
29437        __struct.target_system = buf.get_u8();
29438        __struct.target_component = buf.get_u8();
29439        Ok(__struct)
29440    }
29441    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29442        let mut __tmp = BytesMut::new(bytes);
29443        #[allow(clippy::absurd_extreme_comparisons)]
29444        #[allow(unused_comparisons)]
29445        if __tmp.remaining() < Self::ENCODED_LEN {
29446            panic!(
29447                "buffer is too small (need {} bytes, but got {})",
29448                Self::ENCODED_LEN,
29449                __tmp.remaining(),
29450            )
29451        }
29452        __tmp.put_u64_le(self.time_usec);
29453        for val in &self.controls {
29454            __tmp.put_f32_le(*val);
29455        }
29456        __tmp.put_u8(self.group_mlx);
29457        __tmp.put_u8(self.target_system);
29458        __tmp.put_u8(self.target_component);
29459        if matches!(version, MavlinkVersion::V2) {
29460            let len = __tmp.len();
29461            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29462        } else {
29463            __tmp.len()
29464        }
29465    }
29466}
29467#[doc = "id: 82"]
29468#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
29469#[derive(Debug, Clone, PartialEq)]
29470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29472pub struct SET_ATTITUDE_TARGET_DATA {
29473    #[doc = "Timestamp (time since system boot)."]
29474    pub time_boot_ms: u32,
29475    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
29476    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29477    pub q: [f32; 4],
29478    #[doc = "Body roll rate"]
29479    pub body_roll_rate: f32,
29480    #[doc = "Body pitch rate"]
29481    pub body_pitch_rate: f32,
29482    #[doc = "Body yaw rate"]
29483    pub body_yaw_rate: f32,
29484    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
29485    pub thrust: f32,
29486    #[doc = "System ID"]
29487    pub target_system: u8,
29488    #[doc = "Component ID"]
29489    pub target_component: u8,
29490    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29491    pub type_mask: AttitudeTargetTypemask,
29492    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
29493    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29494    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29495    pub thrust_body: [f32; 3],
29496}
29497impl SET_ATTITUDE_TARGET_DATA {
29498    pub const ENCODED_LEN: usize = 51usize;
29499    pub const DEFAULT: Self = Self {
29500        time_boot_ms: 0_u32,
29501        q: [0.0_f32; 4usize],
29502        body_roll_rate: 0.0_f32,
29503        body_pitch_rate: 0.0_f32,
29504        body_yaw_rate: 0.0_f32,
29505        thrust: 0.0_f32,
29506        target_system: 0_u8,
29507        target_component: 0_u8,
29508        type_mask: AttitudeTargetTypemask::DEFAULT,
29509        thrust_body: [0.0_f32; 3usize],
29510    };
29511    #[cfg(feature = "arbitrary")]
29512    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29513        use arbitrary::{Arbitrary, Unstructured};
29514        let mut buf = [0u8; 1024];
29515        rng.fill_bytes(&mut buf);
29516        let mut unstructured = Unstructured::new(&buf);
29517        Self::arbitrary(&mut unstructured).unwrap_or_default()
29518    }
29519}
29520impl Default for SET_ATTITUDE_TARGET_DATA {
29521    fn default() -> Self {
29522        Self::DEFAULT.clone()
29523    }
29524}
29525impl MessageData for SET_ATTITUDE_TARGET_DATA {
29526    type Message = MavMessage;
29527    const ID: u32 = 82u32;
29528    const NAME: &'static str = "SET_ATTITUDE_TARGET";
29529    const EXTRA_CRC: u8 = 49u8;
29530    const ENCODED_LEN: usize = 51usize;
29531    fn deser(
29532        _version: MavlinkVersion,
29533        __input: &[u8],
29534    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29535        let avail_len = __input.len();
29536        let mut payload_buf = [0; Self::ENCODED_LEN];
29537        let mut buf = if avail_len < Self::ENCODED_LEN {
29538            payload_buf[0..avail_len].copy_from_slice(__input);
29539            Bytes::new(&payload_buf)
29540        } else {
29541            Bytes::new(__input)
29542        };
29543        let mut __struct = Self::default();
29544        __struct.time_boot_ms = buf.get_u32_le();
29545        for v in &mut __struct.q {
29546            let val = buf.get_f32_le();
29547            *v = val;
29548        }
29549        __struct.body_roll_rate = buf.get_f32_le();
29550        __struct.body_pitch_rate = buf.get_f32_le();
29551        __struct.body_yaw_rate = buf.get_f32_le();
29552        __struct.thrust = buf.get_f32_le();
29553        __struct.target_system = buf.get_u8();
29554        __struct.target_component = buf.get_u8();
29555        let tmp = buf.get_u8();
29556        __struct.type_mask = AttitudeTargetTypemask::from_bits(
29557            tmp & AttitudeTargetTypemask::all().bits(),
29558        )
29559        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29560            flag_type: "AttitudeTargetTypemask",
29561            value: tmp as u32,
29562        })?;
29563        for v in &mut __struct.thrust_body {
29564            let val = buf.get_f32_le();
29565            *v = val;
29566        }
29567        Ok(__struct)
29568    }
29569    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29570        let mut __tmp = BytesMut::new(bytes);
29571        #[allow(clippy::absurd_extreme_comparisons)]
29572        #[allow(unused_comparisons)]
29573        if __tmp.remaining() < Self::ENCODED_LEN {
29574            panic!(
29575                "buffer is too small (need {} bytes, but got {})",
29576                Self::ENCODED_LEN,
29577                __tmp.remaining(),
29578            )
29579        }
29580        __tmp.put_u32_le(self.time_boot_ms);
29581        for val in &self.q {
29582            __tmp.put_f32_le(*val);
29583        }
29584        __tmp.put_f32_le(self.body_roll_rate);
29585        __tmp.put_f32_le(self.body_pitch_rate);
29586        __tmp.put_f32_le(self.body_yaw_rate);
29587        __tmp.put_f32_le(self.thrust);
29588        __tmp.put_u8(self.target_system);
29589        __tmp.put_u8(self.target_component);
29590        __tmp.put_u8(self.type_mask.bits());
29591        for val in &self.thrust_body {
29592            __tmp.put_f32_le(*val);
29593        }
29594        if matches!(version, MavlinkVersion::V2) {
29595            let len = __tmp.len();
29596            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29597        } else {
29598            __tmp.len()
29599        }
29600    }
29601}
29602#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
29603#[doc = "id: 48"]
29604#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
29605#[derive(Debug, Clone, PartialEq)]
29606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29607#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29608pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
29609    #[doc = "Latitude (WGS84)"]
29610    pub latitude: i32,
29611    #[doc = "Longitude (WGS84)"]
29612    pub longitude: i32,
29613    #[doc = "Altitude (MSL). Positive for up."]
29614    pub altitude: i32,
29615    #[doc = "System ID"]
29616    pub target_system: u8,
29617    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29618    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29619    pub time_usec: u64,
29620}
29621impl SET_GPS_GLOBAL_ORIGIN_DATA {
29622    pub const ENCODED_LEN: usize = 21usize;
29623    pub const DEFAULT: Self = Self {
29624        latitude: 0_i32,
29625        longitude: 0_i32,
29626        altitude: 0_i32,
29627        target_system: 0_u8,
29628        time_usec: 0_u64,
29629    };
29630    #[cfg(feature = "arbitrary")]
29631    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29632        use arbitrary::{Arbitrary, Unstructured};
29633        let mut buf = [0u8; 1024];
29634        rng.fill_bytes(&mut buf);
29635        let mut unstructured = Unstructured::new(&buf);
29636        Self::arbitrary(&mut unstructured).unwrap_or_default()
29637    }
29638}
29639impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
29640    fn default() -> Self {
29641        Self::DEFAULT.clone()
29642    }
29643}
29644impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
29645    type Message = MavMessage;
29646    const ID: u32 = 48u32;
29647    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
29648    const EXTRA_CRC: u8 = 41u8;
29649    const ENCODED_LEN: usize = 21usize;
29650    fn deser(
29651        _version: MavlinkVersion,
29652        __input: &[u8],
29653    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29654        let avail_len = __input.len();
29655        let mut payload_buf = [0; Self::ENCODED_LEN];
29656        let mut buf = if avail_len < Self::ENCODED_LEN {
29657            payload_buf[0..avail_len].copy_from_slice(__input);
29658            Bytes::new(&payload_buf)
29659        } else {
29660            Bytes::new(__input)
29661        };
29662        let mut __struct = Self::default();
29663        __struct.latitude = buf.get_i32_le();
29664        __struct.longitude = buf.get_i32_le();
29665        __struct.altitude = buf.get_i32_le();
29666        __struct.target_system = buf.get_u8();
29667        __struct.time_usec = buf.get_u64_le();
29668        Ok(__struct)
29669    }
29670    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29671        let mut __tmp = BytesMut::new(bytes);
29672        #[allow(clippy::absurd_extreme_comparisons)]
29673        #[allow(unused_comparisons)]
29674        if __tmp.remaining() < Self::ENCODED_LEN {
29675            panic!(
29676                "buffer is too small (need {} bytes, but got {})",
29677                Self::ENCODED_LEN,
29678                __tmp.remaining(),
29679            )
29680        }
29681        __tmp.put_i32_le(self.latitude);
29682        __tmp.put_i32_le(self.longitude);
29683        __tmp.put_i32_le(self.altitude);
29684        __tmp.put_u8(self.target_system);
29685        __tmp.put_u64_le(self.time_usec);
29686        if matches!(version, MavlinkVersion::V2) {
29687            let len = __tmp.len();
29688            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29689        } else {
29690            __tmp.len()
29691        }
29692    }
29693}
29694#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
29695#[doc = "id: 243"]
29696#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
29697#[derive(Debug, Clone, PartialEq)]
29698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29699#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29700pub struct SET_HOME_POSITION_DATA {
29701    #[doc = "Latitude (WGS84)"]
29702    pub latitude: i32,
29703    #[doc = "Longitude (WGS84)"]
29704    pub longitude: i32,
29705    #[doc = "Altitude (MSL). Positive for up."]
29706    pub altitude: i32,
29707    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
29708    pub x: f32,
29709    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
29710    pub y: f32,
29711    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
29712    pub z: f32,
29713    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
29714    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29715    pub q: [f32; 4],
29716    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29717    pub approach_x: f32,
29718    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29719    pub approach_y: f32,
29720    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29721    pub approach_z: f32,
29722    #[doc = "System ID."]
29723    pub target_system: u8,
29724    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29725    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29726    pub time_usec: u64,
29727}
29728impl SET_HOME_POSITION_DATA {
29729    pub const ENCODED_LEN: usize = 61usize;
29730    pub const DEFAULT: Self = Self {
29731        latitude: 0_i32,
29732        longitude: 0_i32,
29733        altitude: 0_i32,
29734        x: 0.0_f32,
29735        y: 0.0_f32,
29736        z: 0.0_f32,
29737        q: [0.0_f32; 4usize],
29738        approach_x: 0.0_f32,
29739        approach_y: 0.0_f32,
29740        approach_z: 0.0_f32,
29741        target_system: 0_u8,
29742        time_usec: 0_u64,
29743    };
29744    #[cfg(feature = "arbitrary")]
29745    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29746        use arbitrary::{Arbitrary, Unstructured};
29747        let mut buf = [0u8; 1024];
29748        rng.fill_bytes(&mut buf);
29749        let mut unstructured = Unstructured::new(&buf);
29750        Self::arbitrary(&mut unstructured).unwrap_or_default()
29751    }
29752}
29753impl Default for SET_HOME_POSITION_DATA {
29754    fn default() -> Self {
29755        Self::DEFAULT.clone()
29756    }
29757}
29758impl MessageData for SET_HOME_POSITION_DATA {
29759    type Message = MavMessage;
29760    const ID: u32 = 243u32;
29761    const NAME: &'static str = "SET_HOME_POSITION";
29762    const EXTRA_CRC: u8 = 85u8;
29763    const ENCODED_LEN: usize = 61usize;
29764    fn deser(
29765        _version: MavlinkVersion,
29766        __input: &[u8],
29767    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29768        let avail_len = __input.len();
29769        let mut payload_buf = [0; Self::ENCODED_LEN];
29770        let mut buf = if avail_len < Self::ENCODED_LEN {
29771            payload_buf[0..avail_len].copy_from_slice(__input);
29772            Bytes::new(&payload_buf)
29773        } else {
29774            Bytes::new(__input)
29775        };
29776        let mut __struct = Self::default();
29777        __struct.latitude = buf.get_i32_le();
29778        __struct.longitude = buf.get_i32_le();
29779        __struct.altitude = buf.get_i32_le();
29780        __struct.x = buf.get_f32_le();
29781        __struct.y = buf.get_f32_le();
29782        __struct.z = buf.get_f32_le();
29783        for v in &mut __struct.q {
29784            let val = buf.get_f32_le();
29785            *v = val;
29786        }
29787        __struct.approach_x = buf.get_f32_le();
29788        __struct.approach_y = buf.get_f32_le();
29789        __struct.approach_z = buf.get_f32_le();
29790        __struct.target_system = buf.get_u8();
29791        __struct.time_usec = buf.get_u64_le();
29792        Ok(__struct)
29793    }
29794    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29795        let mut __tmp = BytesMut::new(bytes);
29796        #[allow(clippy::absurd_extreme_comparisons)]
29797        #[allow(unused_comparisons)]
29798        if __tmp.remaining() < Self::ENCODED_LEN {
29799            panic!(
29800                "buffer is too small (need {} bytes, but got {})",
29801                Self::ENCODED_LEN,
29802                __tmp.remaining(),
29803            )
29804        }
29805        __tmp.put_i32_le(self.latitude);
29806        __tmp.put_i32_le(self.longitude);
29807        __tmp.put_i32_le(self.altitude);
29808        __tmp.put_f32_le(self.x);
29809        __tmp.put_f32_le(self.y);
29810        __tmp.put_f32_le(self.z);
29811        for val in &self.q {
29812            __tmp.put_f32_le(*val);
29813        }
29814        __tmp.put_f32_le(self.approach_x);
29815        __tmp.put_f32_le(self.approach_y);
29816        __tmp.put_f32_le(self.approach_z);
29817        __tmp.put_u8(self.target_system);
29818        __tmp.put_u64_le(self.time_usec);
29819        if matches!(version, MavlinkVersion::V2) {
29820            let len = __tmp.len();
29821            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29822        } else {
29823            __tmp.len()
29824        }
29825    }
29826}
29827#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
29828#[doc = "id: 11"]
29829#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
29830#[derive(Debug, Clone, PartialEq)]
29831#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29832#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29833pub struct SET_MODE_DATA {
29834    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
29835    pub custom_mode: u32,
29836    #[doc = "The system setting the mode"]
29837    pub target_system: u8,
29838    #[doc = "The new base mode."]
29839    pub base_mode: MavMode,
29840}
29841impl SET_MODE_DATA {
29842    pub const ENCODED_LEN: usize = 6usize;
29843    pub const DEFAULT: Self = Self {
29844        custom_mode: 0_u32,
29845        target_system: 0_u8,
29846        base_mode: MavMode::DEFAULT,
29847    };
29848    #[cfg(feature = "arbitrary")]
29849    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29850        use arbitrary::{Arbitrary, Unstructured};
29851        let mut buf = [0u8; 1024];
29852        rng.fill_bytes(&mut buf);
29853        let mut unstructured = Unstructured::new(&buf);
29854        Self::arbitrary(&mut unstructured).unwrap_or_default()
29855    }
29856}
29857impl Default for SET_MODE_DATA {
29858    fn default() -> Self {
29859        Self::DEFAULT.clone()
29860    }
29861}
29862impl MessageData for SET_MODE_DATA {
29863    type Message = MavMessage;
29864    const ID: u32 = 11u32;
29865    const NAME: &'static str = "SET_MODE";
29866    const EXTRA_CRC: u8 = 89u8;
29867    const ENCODED_LEN: usize = 6usize;
29868    fn deser(
29869        _version: MavlinkVersion,
29870        __input: &[u8],
29871    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29872        let avail_len = __input.len();
29873        let mut payload_buf = [0; Self::ENCODED_LEN];
29874        let mut buf = if avail_len < Self::ENCODED_LEN {
29875            payload_buf[0..avail_len].copy_from_slice(__input);
29876            Bytes::new(&payload_buf)
29877        } else {
29878            Bytes::new(__input)
29879        };
29880        let mut __struct = Self::default();
29881        __struct.custom_mode = buf.get_u32_le();
29882        __struct.target_system = buf.get_u8();
29883        let tmp = buf.get_u8();
29884        __struct.base_mode =
29885            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29886                enum_type: "MavMode",
29887                value: tmp as u32,
29888            })?;
29889        Ok(__struct)
29890    }
29891    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29892        let mut __tmp = BytesMut::new(bytes);
29893        #[allow(clippy::absurd_extreme_comparisons)]
29894        #[allow(unused_comparisons)]
29895        if __tmp.remaining() < Self::ENCODED_LEN {
29896            panic!(
29897                "buffer is too small (need {} bytes, but got {})",
29898                Self::ENCODED_LEN,
29899                __tmp.remaining(),
29900            )
29901        }
29902        __tmp.put_u32_le(self.custom_mode);
29903        __tmp.put_u8(self.target_system);
29904        __tmp.put_u8(self.base_mode as u8);
29905        if matches!(version, MavlinkVersion::V2) {
29906            let len = __tmp.len();
29907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29908        } else {
29909            __tmp.len()
29910        }
29911    }
29912}
29913#[doc = "id: 86"]
29914#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
29915#[derive(Debug, Clone, PartialEq)]
29916#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29917#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29918pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
29919    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
29920    pub time_boot_ms: u32,
29921    #[doc = "Latitude in WGS84 frame"]
29922    pub lat_int: i32,
29923    #[doc = "Longitude in WGS84 frame"]
29924    pub lon_int: i32,
29925    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
29926    pub alt: f32,
29927    #[doc = "X velocity in NED frame"]
29928    pub vx: f32,
29929    #[doc = "Y velocity in NED frame"]
29930    pub vy: f32,
29931    #[doc = "Z velocity in NED frame"]
29932    pub vz: f32,
29933    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29934    pub afx: f32,
29935    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29936    pub afy: f32,
29937    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29938    pub afz: f32,
29939    #[doc = "yaw setpoint"]
29940    pub yaw: f32,
29941    #[doc = "yaw rate setpoint"]
29942    pub yaw_rate: f32,
29943    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29944    pub type_mask: PositionTargetTypemask,
29945    #[doc = "System ID"]
29946    pub target_system: u8,
29947    #[doc = "Component ID"]
29948    pub target_component: u8,
29949    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
29950    pub coordinate_frame: MavFrame,
29951}
29952impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
29953    pub const ENCODED_LEN: usize = 53usize;
29954    pub const DEFAULT: Self = Self {
29955        time_boot_ms: 0_u32,
29956        lat_int: 0_i32,
29957        lon_int: 0_i32,
29958        alt: 0.0_f32,
29959        vx: 0.0_f32,
29960        vy: 0.0_f32,
29961        vz: 0.0_f32,
29962        afx: 0.0_f32,
29963        afy: 0.0_f32,
29964        afz: 0.0_f32,
29965        yaw: 0.0_f32,
29966        yaw_rate: 0.0_f32,
29967        type_mask: PositionTargetTypemask::DEFAULT,
29968        target_system: 0_u8,
29969        target_component: 0_u8,
29970        coordinate_frame: MavFrame::DEFAULT,
29971    };
29972    #[cfg(feature = "arbitrary")]
29973    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29974        use arbitrary::{Arbitrary, Unstructured};
29975        let mut buf = [0u8; 1024];
29976        rng.fill_bytes(&mut buf);
29977        let mut unstructured = Unstructured::new(&buf);
29978        Self::arbitrary(&mut unstructured).unwrap_or_default()
29979    }
29980}
29981impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
29982    fn default() -> Self {
29983        Self::DEFAULT.clone()
29984    }
29985}
29986impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
29987    type Message = MavMessage;
29988    const ID: u32 = 86u32;
29989    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
29990    const EXTRA_CRC: u8 = 5u8;
29991    const ENCODED_LEN: usize = 53usize;
29992    fn deser(
29993        _version: MavlinkVersion,
29994        __input: &[u8],
29995    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29996        let avail_len = __input.len();
29997        let mut payload_buf = [0; Self::ENCODED_LEN];
29998        let mut buf = if avail_len < Self::ENCODED_LEN {
29999            payload_buf[0..avail_len].copy_from_slice(__input);
30000            Bytes::new(&payload_buf)
30001        } else {
30002            Bytes::new(__input)
30003        };
30004        let mut __struct = Self::default();
30005        __struct.time_boot_ms = buf.get_u32_le();
30006        __struct.lat_int = buf.get_i32_le();
30007        __struct.lon_int = buf.get_i32_le();
30008        __struct.alt = buf.get_f32_le();
30009        __struct.vx = buf.get_f32_le();
30010        __struct.vy = buf.get_f32_le();
30011        __struct.vz = buf.get_f32_le();
30012        __struct.afx = buf.get_f32_le();
30013        __struct.afy = buf.get_f32_le();
30014        __struct.afz = buf.get_f32_le();
30015        __struct.yaw = buf.get_f32_le();
30016        __struct.yaw_rate = buf.get_f32_le();
30017        let tmp = buf.get_u16_le();
30018        __struct.type_mask = PositionTargetTypemask::from_bits(
30019            tmp & PositionTargetTypemask::all().bits(),
30020        )
30021        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30022            flag_type: "PositionTargetTypemask",
30023            value: tmp as u32,
30024        })?;
30025        __struct.target_system = buf.get_u8();
30026        __struct.target_component = buf.get_u8();
30027        let tmp = buf.get_u8();
30028        __struct.coordinate_frame =
30029            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30030                enum_type: "MavFrame",
30031                value: tmp as u32,
30032            })?;
30033        Ok(__struct)
30034    }
30035    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30036        let mut __tmp = BytesMut::new(bytes);
30037        #[allow(clippy::absurd_extreme_comparisons)]
30038        #[allow(unused_comparisons)]
30039        if __tmp.remaining() < Self::ENCODED_LEN {
30040            panic!(
30041                "buffer is too small (need {} bytes, but got {})",
30042                Self::ENCODED_LEN,
30043                __tmp.remaining(),
30044            )
30045        }
30046        __tmp.put_u32_le(self.time_boot_ms);
30047        __tmp.put_i32_le(self.lat_int);
30048        __tmp.put_i32_le(self.lon_int);
30049        __tmp.put_f32_le(self.alt);
30050        __tmp.put_f32_le(self.vx);
30051        __tmp.put_f32_le(self.vy);
30052        __tmp.put_f32_le(self.vz);
30053        __tmp.put_f32_le(self.afx);
30054        __tmp.put_f32_le(self.afy);
30055        __tmp.put_f32_le(self.afz);
30056        __tmp.put_f32_le(self.yaw);
30057        __tmp.put_f32_le(self.yaw_rate);
30058        __tmp.put_u16_le(self.type_mask.bits());
30059        __tmp.put_u8(self.target_system);
30060        __tmp.put_u8(self.target_component);
30061        __tmp.put_u8(self.coordinate_frame as u8);
30062        if matches!(version, MavlinkVersion::V2) {
30063            let len = __tmp.len();
30064            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30065        } else {
30066            __tmp.len()
30067        }
30068    }
30069}
30070#[doc = "id: 84"]
30071#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
30072#[derive(Debug, Clone, PartialEq)]
30073#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30074#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30075pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
30076    #[doc = "Timestamp (time since system boot)."]
30077    pub time_boot_ms: u32,
30078    #[doc = "X Position in NED frame"]
30079    pub x: f32,
30080    #[doc = "Y Position in NED frame"]
30081    pub y: f32,
30082    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
30083    pub z: f32,
30084    #[doc = "X velocity in NED frame"]
30085    pub vx: f32,
30086    #[doc = "Y velocity in NED frame"]
30087    pub vy: f32,
30088    #[doc = "Z velocity in NED frame"]
30089    pub vz: f32,
30090    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30091    pub afx: f32,
30092    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30093    pub afy: f32,
30094    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30095    pub afz: f32,
30096    #[doc = "yaw setpoint"]
30097    pub yaw: f32,
30098    #[doc = "yaw rate setpoint"]
30099    pub yaw_rate: f32,
30100    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30101    pub type_mask: PositionTargetTypemask,
30102    #[doc = "System ID"]
30103    pub target_system: u8,
30104    #[doc = "Component ID"]
30105    pub target_component: u8,
30106    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
30107    pub coordinate_frame: MavFrame,
30108}
30109impl SET_POSITION_TARGET_LOCAL_NED_DATA {
30110    pub const ENCODED_LEN: usize = 53usize;
30111    pub const DEFAULT: Self = Self {
30112        time_boot_ms: 0_u32,
30113        x: 0.0_f32,
30114        y: 0.0_f32,
30115        z: 0.0_f32,
30116        vx: 0.0_f32,
30117        vy: 0.0_f32,
30118        vz: 0.0_f32,
30119        afx: 0.0_f32,
30120        afy: 0.0_f32,
30121        afz: 0.0_f32,
30122        yaw: 0.0_f32,
30123        yaw_rate: 0.0_f32,
30124        type_mask: PositionTargetTypemask::DEFAULT,
30125        target_system: 0_u8,
30126        target_component: 0_u8,
30127        coordinate_frame: MavFrame::DEFAULT,
30128    };
30129    #[cfg(feature = "arbitrary")]
30130    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30131        use arbitrary::{Arbitrary, Unstructured};
30132        let mut buf = [0u8; 1024];
30133        rng.fill_bytes(&mut buf);
30134        let mut unstructured = Unstructured::new(&buf);
30135        Self::arbitrary(&mut unstructured).unwrap_or_default()
30136    }
30137}
30138impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
30139    fn default() -> Self {
30140        Self::DEFAULT.clone()
30141    }
30142}
30143impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
30144    type Message = MavMessage;
30145    const ID: u32 = 84u32;
30146    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
30147    const EXTRA_CRC: u8 = 143u8;
30148    const ENCODED_LEN: usize = 53usize;
30149    fn deser(
30150        _version: MavlinkVersion,
30151        __input: &[u8],
30152    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30153        let avail_len = __input.len();
30154        let mut payload_buf = [0; Self::ENCODED_LEN];
30155        let mut buf = if avail_len < Self::ENCODED_LEN {
30156            payload_buf[0..avail_len].copy_from_slice(__input);
30157            Bytes::new(&payload_buf)
30158        } else {
30159            Bytes::new(__input)
30160        };
30161        let mut __struct = Self::default();
30162        __struct.time_boot_ms = buf.get_u32_le();
30163        __struct.x = buf.get_f32_le();
30164        __struct.y = buf.get_f32_le();
30165        __struct.z = buf.get_f32_le();
30166        __struct.vx = buf.get_f32_le();
30167        __struct.vy = buf.get_f32_le();
30168        __struct.vz = buf.get_f32_le();
30169        __struct.afx = buf.get_f32_le();
30170        __struct.afy = buf.get_f32_le();
30171        __struct.afz = buf.get_f32_le();
30172        __struct.yaw = buf.get_f32_le();
30173        __struct.yaw_rate = buf.get_f32_le();
30174        let tmp = buf.get_u16_le();
30175        __struct.type_mask = PositionTargetTypemask::from_bits(
30176            tmp & PositionTargetTypemask::all().bits(),
30177        )
30178        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30179            flag_type: "PositionTargetTypemask",
30180            value: tmp as u32,
30181        })?;
30182        __struct.target_system = buf.get_u8();
30183        __struct.target_component = buf.get_u8();
30184        let tmp = buf.get_u8();
30185        __struct.coordinate_frame =
30186            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30187                enum_type: "MavFrame",
30188                value: tmp as u32,
30189            })?;
30190        Ok(__struct)
30191    }
30192    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30193        let mut __tmp = BytesMut::new(bytes);
30194        #[allow(clippy::absurd_extreme_comparisons)]
30195        #[allow(unused_comparisons)]
30196        if __tmp.remaining() < Self::ENCODED_LEN {
30197            panic!(
30198                "buffer is too small (need {} bytes, but got {})",
30199                Self::ENCODED_LEN,
30200                __tmp.remaining(),
30201            )
30202        }
30203        __tmp.put_u32_le(self.time_boot_ms);
30204        __tmp.put_f32_le(self.x);
30205        __tmp.put_f32_le(self.y);
30206        __tmp.put_f32_le(self.z);
30207        __tmp.put_f32_le(self.vx);
30208        __tmp.put_f32_le(self.vy);
30209        __tmp.put_f32_le(self.vz);
30210        __tmp.put_f32_le(self.afx);
30211        __tmp.put_f32_le(self.afy);
30212        __tmp.put_f32_le(self.afz);
30213        __tmp.put_f32_le(self.yaw);
30214        __tmp.put_f32_le(self.yaw_rate);
30215        __tmp.put_u16_le(self.type_mask.bits());
30216        __tmp.put_u8(self.target_system);
30217        __tmp.put_u8(self.target_component);
30218        __tmp.put_u8(self.coordinate_frame as u8);
30219        if matches!(version, MavlinkVersion::V2) {
30220            let len = __tmp.len();
30221            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30222        } else {
30223            __tmp.len()
30224        }
30225    }
30226}
30227#[doc = "id: 108"]
30228#[doc = "Status of simulation environment, if used."]
30229#[derive(Debug, Clone, PartialEq)]
30230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30232pub struct SIM_STATE_DATA {
30233    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
30234    pub q1: f32,
30235    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
30236    pub q2: f32,
30237    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
30238    pub q3: f32,
30239    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
30240    pub q4: f32,
30241    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
30242    pub roll: f32,
30243    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
30244    pub pitch: f32,
30245    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
30246    pub yaw: f32,
30247    #[doc = "X acceleration"]
30248    pub xacc: f32,
30249    #[doc = "Y acceleration"]
30250    pub yacc: f32,
30251    #[doc = "Z acceleration"]
30252    pub zacc: f32,
30253    #[doc = "Angular speed around X axis"]
30254    pub xgyro: f32,
30255    #[doc = "Angular speed around Y axis"]
30256    pub ygyro: f32,
30257    #[doc = "Angular speed around Z axis"]
30258    pub zgyro: f32,
30259    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
30260    pub lat: f32,
30261    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
30262    pub lon: f32,
30263    #[doc = "Altitude"]
30264    pub alt: f32,
30265    #[doc = "Horizontal position standard deviation"]
30266    pub std_dev_horz: f32,
30267    #[doc = "Vertical position standard deviation"]
30268    pub std_dev_vert: f32,
30269    #[doc = "True velocity in north direction in earth-fixed NED frame"]
30270    pub vn: f32,
30271    #[doc = "True velocity in east direction in earth-fixed NED frame"]
30272    pub ve: f32,
30273    #[doc = "True velocity in down direction in earth-fixed NED frame"]
30274    pub vd: f32,
30275    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
30276    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30277    pub lat_int: i32,
30278    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
30279    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30280    pub lon_int: i32,
30281}
30282impl SIM_STATE_DATA {
30283    pub const ENCODED_LEN: usize = 92usize;
30284    pub const DEFAULT: Self = Self {
30285        q1: 0.0_f32,
30286        q2: 0.0_f32,
30287        q3: 0.0_f32,
30288        q4: 0.0_f32,
30289        roll: 0.0_f32,
30290        pitch: 0.0_f32,
30291        yaw: 0.0_f32,
30292        xacc: 0.0_f32,
30293        yacc: 0.0_f32,
30294        zacc: 0.0_f32,
30295        xgyro: 0.0_f32,
30296        ygyro: 0.0_f32,
30297        zgyro: 0.0_f32,
30298        lat: 0.0_f32,
30299        lon: 0.0_f32,
30300        alt: 0.0_f32,
30301        std_dev_horz: 0.0_f32,
30302        std_dev_vert: 0.0_f32,
30303        vn: 0.0_f32,
30304        ve: 0.0_f32,
30305        vd: 0.0_f32,
30306        lat_int: 0_i32,
30307        lon_int: 0_i32,
30308    };
30309    #[cfg(feature = "arbitrary")]
30310    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30311        use arbitrary::{Arbitrary, Unstructured};
30312        let mut buf = [0u8; 1024];
30313        rng.fill_bytes(&mut buf);
30314        let mut unstructured = Unstructured::new(&buf);
30315        Self::arbitrary(&mut unstructured).unwrap_or_default()
30316    }
30317}
30318impl Default for SIM_STATE_DATA {
30319    fn default() -> Self {
30320        Self::DEFAULT.clone()
30321    }
30322}
30323impl MessageData for SIM_STATE_DATA {
30324    type Message = MavMessage;
30325    const ID: u32 = 108u32;
30326    const NAME: &'static str = "SIM_STATE";
30327    const EXTRA_CRC: u8 = 32u8;
30328    const ENCODED_LEN: usize = 92usize;
30329    fn deser(
30330        _version: MavlinkVersion,
30331        __input: &[u8],
30332    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30333        let avail_len = __input.len();
30334        let mut payload_buf = [0; Self::ENCODED_LEN];
30335        let mut buf = if avail_len < Self::ENCODED_LEN {
30336            payload_buf[0..avail_len].copy_from_slice(__input);
30337            Bytes::new(&payload_buf)
30338        } else {
30339            Bytes::new(__input)
30340        };
30341        let mut __struct = Self::default();
30342        __struct.q1 = buf.get_f32_le();
30343        __struct.q2 = buf.get_f32_le();
30344        __struct.q3 = buf.get_f32_le();
30345        __struct.q4 = buf.get_f32_le();
30346        __struct.roll = buf.get_f32_le();
30347        __struct.pitch = buf.get_f32_le();
30348        __struct.yaw = buf.get_f32_le();
30349        __struct.xacc = buf.get_f32_le();
30350        __struct.yacc = buf.get_f32_le();
30351        __struct.zacc = buf.get_f32_le();
30352        __struct.xgyro = buf.get_f32_le();
30353        __struct.ygyro = buf.get_f32_le();
30354        __struct.zgyro = buf.get_f32_le();
30355        __struct.lat = buf.get_f32_le();
30356        __struct.lon = buf.get_f32_le();
30357        __struct.alt = buf.get_f32_le();
30358        __struct.std_dev_horz = buf.get_f32_le();
30359        __struct.std_dev_vert = buf.get_f32_le();
30360        __struct.vn = buf.get_f32_le();
30361        __struct.ve = buf.get_f32_le();
30362        __struct.vd = buf.get_f32_le();
30363        __struct.lat_int = buf.get_i32_le();
30364        __struct.lon_int = buf.get_i32_le();
30365        Ok(__struct)
30366    }
30367    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30368        let mut __tmp = BytesMut::new(bytes);
30369        #[allow(clippy::absurd_extreme_comparisons)]
30370        #[allow(unused_comparisons)]
30371        if __tmp.remaining() < Self::ENCODED_LEN {
30372            panic!(
30373                "buffer is too small (need {} bytes, but got {})",
30374                Self::ENCODED_LEN,
30375                __tmp.remaining(),
30376            )
30377        }
30378        __tmp.put_f32_le(self.q1);
30379        __tmp.put_f32_le(self.q2);
30380        __tmp.put_f32_le(self.q3);
30381        __tmp.put_f32_le(self.q4);
30382        __tmp.put_f32_le(self.roll);
30383        __tmp.put_f32_le(self.pitch);
30384        __tmp.put_f32_le(self.yaw);
30385        __tmp.put_f32_le(self.xacc);
30386        __tmp.put_f32_le(self.yacc);
30387        __tmp.put_f32_le(self.zacc);
30388        __tmp.put_f32_le(self.xgyro);
30389        __tmp.put_f32_le(self.ygyro);
30390        __tmp.put_f32_le(self.zgyro);
30391        __tmp.put_f32_le(self.lat);
30392        __tmp.put_f32_le(self.lon);
30393        __tmp.put_f32_le(self.alt);
30394        __tmp.put_f32_le(self.std_dev_horz);
30395        __tmp.put_f32_le(self.std_dev_vert);
30396        __tmp.put_f32_le(self.vn);
30397        __tmp.put_f32_le(self.ve);
30398        __tmp.put_f32_le(self.vd);
30399        __tmp.put_i32_le(self.lat_int);
30400        __tmp.put_i32_le(self.lon_int);
30401        if matches!(version, MavlinkVersion::V2) {
30402            let len = __tmp.len();
30403            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30404        } else {
30405            __tmp.len()
30406        }
30407    }
30408}
30409#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
30410#[doc = "id: 370"]
30411#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
30412#[derive(Debug, Clone, PartialEq)]
30413#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30414#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30415pub struct SMART_BATTERY_INFO_DATA {
30416    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
30417    pub capacity_full_specification: i32,
30418    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
30419    pub capacity_full: i32,
30420    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
30421    pub cycle_count: u16,
30422    #[doc = "Battery weight. 0: field not provided."]
30423    pub weight: u16,
30424    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
30425    pub discharge_minimum_voltage: u16,
30426    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
30427    pub charging_minimum_voltage: u16,
30428    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
30429    pub resting_minimum_voltage: u16,
30430    #[doc = "Battery ID"]
30431    pub id: u8,
30432    #[doc = "Function of the battery"]
30433    pub battery_function: MavBatteryFunction,
30434    #[doc = "Type (chemistry) of the battery"]
30435    pub mavtype: MavBatteryType,
30436    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
30437    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30438    pub serial_number: [u8; 16],
30439    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
30440    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30441    pub device_name: [u8; 50],
30442    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
30443    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30444    pub charging_maximum_voltage: u16,
30445    #[doc = "Number of battery cells in series. 0: field not provided."]
30446    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30447    pub cells_in_series: u8,
30448    #[doc = "Maximum pack discharge current. 0: field not provided."]
30449    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30450    pub discharge_maximum_current: u32,
30451    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
30452    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30453    pub discharge_maximum_burst_current: u32,
30454    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
30455    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30456    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30457    pub manufacture_date: [u8; 11],
30458}
30459impl SMART_BATTERY_INFO_DATA {
30460    pub const ENCODED_LEN: usize = 109usize;
30461    pub const DEFAULT: Self = Self {
30462        capacity_full_specification: 0_i32,
30463        capacity_full: 0_i32,
30464        cycle_count: 0_u16,
30465        weight: 0_u16,
30466        discharge_minimum_voltage: 0_u16,
30467        charging_minimum_voltage: 0_u16,
30468        resting_minimum_voltage: 0_u16,
30469        id: 0_u8,
30470        battery_function: MavBatteryFunction::DEFAULT,
30471        mavtype: MavBatteryType::DEFAULT,
30472        serial_number: [0_u8; 16usize],
30473        device_name: [0_u8; 50usize],
30474        charging_maximum_voltage: 0_u16,
30475        cells_in_series: 0_u8,
30476        discharge_maximum_current: 0_u32,
30477        discharge_maximum_burst_current: 0_u32,
30478        manufacture_date: [0_u8; 11usize],
30479    };
30480    #[cfg(feature = "arbitrary")]
30481    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30482        use arbitrary::{Arbitrary, Unstructured};
30483        let mut buf = [0u8; 1024];
30484        rng.fill_bytes(&mut buf);
30485        let mut unstructured = Unstructured::new(&buf);
30486        Self::arbitrary(&mut unstructured).unwrap_or_default()
30487    }
30488}
30489impl Default for SMART_BATTERY_INFO_DATA {
30490    fn default() -> Self {
30491        Self::DEFAULT.clone()
30492    }
30493}
30494impl MessageData for SMART_BATTERY_INFO_DATA {
30495    type Message = MavMessage;
30496    const ID: u32 = 370u32;
30497    const NAME: &'static str = "SMART_BATTERY_INFO";
30498    const EXTRA_CRC: u8 = 75u8;
30499    const ENCODED_LEN: usize = 109usize;
30500    fn deser(
30501        _version: MavlinkVersion,
30502        __input: &[u8],
30503    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30504        let avail_len = __input.len();
30505        let mut payload_buf = [0; Self::ENCODED_LEN];
30506        let mut buf = if avail_len < Self::ENCODED_LEN {
30507            payload_buf[0..avail_len].copy_from_slice(__input);
30508            Bytes::new(&payload_buf)
30509        } else {
30510            Bytes::new(__input)
30511        };
30512        let mut __struct = Self::default();
30513        __struct.capacity_full_specification = buf.get_i32_le();
30514        __struct.capacity_full = buf.get_i32_le();
30515        __struct.cycle_count = buf.get_u16_le();
30516        __struct.weight = buf.get_u16_le();
30517        __struct.discharge_minimum_voltage = buf.get_u16_le();
30518        __struct.charging_minimum_voltage = buf.get_u16_le();
30519        __struct.resting_minimum_voltage = buf.get_u16_le();
30520        __struct.id = buf.get_u8();
30521        let tmp = buf.get_u8();
30522        __struct.battery_function =
30523            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30524                enum_type: "MavBatteryFunction",
30525                value: tmp as u32,
30526            })?;
30527        let tmp = buf.get_u8();
30528        __struct.mavtype =
30529            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30530                enum_type: "MavBatteryType",
30531                value: tmp as u32,
30532            })?;
30533        for v in &mut __struct.serial_number {
30534            let val = buf.get_u8();
30535            *v = val;
30536        }
30537        for v in &mut __struct.device_name {
30538            let val = buf.get_u8();
30539            *v = val;
30540        }
30541        __struct.charging_maximum_voltage = buf.get_u16_le();
30542        __struct.cells_in_series = buf.get_u8();
30543        __struct.discharge_maximum_current = buf.get_u32_le();
30544        __struct.discharge_maximum_burst_current = buf.get_u32_le();
30545        for v in &mut __struct.manufacture_date {
30546            let val = buf.get_u8();
30547            *v = val;
30548        }
30549        Ok(__struct)
30550    }
30551    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30552        let mut __tmp = BytesMut::new(bytes);
30553        #[allow(clippy::absurd_extreme_comparisons)]
30554        #[allow(unused_comparisons)]
30555        if __tmp.remaining() < Self::ENCODED_LEN {
30556            panic!(
30557                "buffer is too small (need {} bytes, but got {})",
30558                Self::ENCODED_LEN,
30559                __tmp.remaining(),
30560            )
30561        }
30562        __tmp.put_i32_le(self.capacity_full_specification);
30563        __tmp.put_i32_le(self.capacity_full);
30564        __tmp.put_u16_le(self.cycle_count);
30565        __tmp.put_u16_le(self.weight);
30566        __tmp.put_u16_le(self.discharge_minimum_voltage);
30567        __tmp.put_u16_le(self.charging_minimum_voltage);
30568        __tmp.put_u16_le(self.resting_minimum_voltage);
30569        __tmp.put_u8(self.id);
30570        __tmp.put_u8(self.battery_function as u8);
30571        __tmp.put_u8(self.mavtype as u8);
30572        for val in &self.serial_number {
30573            __tmp.put_u8(*val);
30574        }
30575        for val in &self.device_name {
30576            __tmp.put_u8(*val);
30577        }
30578        __tmp.put_u16_le(self.charging_maximum_voltage);
30579        __tmp.put_u8(self.cells_in_series);
30580        __tmp.put_u32_le(self.discharge_maximum_current);
30581        __tmp.put_u32_le(self.discharge_maximum_burst_current);
30582        for val in &self.manufacture_date {
30583            __tmp.put_u8(*val);
30584        }
30585        if matches!(version, MavlinkVersion::V2) {
30586            let len = __tmp.len();
30587            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30588        } else {
30589            __tmp.len()
30590        }
30591    }
30592}
30593#[doc = "id: 253"]
30594#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
30595#[derive(Debug, Clone, PartialEq)]
30596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30597#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30598pub struct STATUSTEXT_DATA {
30599    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
30600    pub severity: MavSeverity,
30601    #[doc = "Status text message, without null termination character"]
30602    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30603    pub text: [u8; 50],
30604    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
30605    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30606    pub id: u16,
30607    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
30608    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30609    pub chunk_seq: u8,
30610}
30611impl STATUSTEXT_DATA {
30612    pub const ENCODED_LEN: usize = 54usize;
30613    pub const DEFAULT: Self = Self {
30614        severity: MavSeverity::DEFAULT,
30615        text: [0_u8; 50usize],
30616        id: 0_u16,
30617        chunk_seq: 0_u8,
30618    };
30619    #[cfg(feature = "arbitrary")]
30620    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30621        use arbitrary::{Arbitrary, Unstructured};
30622        let mut buf = [0u8; 1024];
30623        rng.fill_bytes(&mut buf);
30624        let mut unstructured = Unstructured::new(&buf);
30625        Self::arbitrary(&mut unstructured).unwrap_or_default()
30626    }
30627}
30628impl Default for STATUSTEXT_DATA {
30629    fn default() -> Self {
30630        Self::DEFAULT.clone()
30631    }
30632}
30633impl MessageData for STATUSTEXT_DATA {
30634    type Message = MavMessage;
30635    const ID: u32 = 253u32;
30636    const NAME: &'static str = "STATUSTEXT";
30637    const EXTRA_CRC: u8 = 83u8;
30638    const ENCODED_LEN: usize = 54usize;
30639    fn deser(
30640        _version: MavlinkVersion,
30641        __input: &[u8],
30642    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30643        let avail_len = __input.len();
30644        let mut payload_buf = [0; Self::ENCODED_LEN];
30645        let mut buf = if avail_len < Self::ENCODED_LEN {
30646            payload_buf[0..avail_len].copy_from_slice(__input);
30647            Bytes::new(&payload_buf)
30648        } else {
30649            Bytes::new(__input)
30650        };
30651        let mut __struct = Self::default();
30652        let tmp = buf.get_u8();
30653        __struct.severity =
30654            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30655                enum_type: "MavSeverity",
30656                value: tmp as u32,
30657            })?;
30658        for v in &mut __struct.text {
30659            let val = buf.get_u8();
30660            *v = val;
30661        }
30662        __struct.id = buf.get_u16_le();
30663        __struct.chunk_seq = buf.get_u8();
30664        Ok(__struct)
30665    }
30666    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30667        let mut __tmp = BytesMut::new(bytes);
30668        #[allow(clippy::absurd_extreme_comparisons)]
30669        #[allow(unused_comparisons)]
30670        if __tmp.remaining() < Self::ENCODED_LEN {
30671            panic!(
30672                "buffer is too small (need {} bytes, but got {})",
30673                Self::ENCODED_LEN,
30674                __tmp.remaining(),
30675            )
30676        }
30677        __tmp.put_u8(self.severity as u8);
30678        for val in &self.text {
30679            __tmp.put_u8(*val);
30680        }
30681        __tmp.put_u16_le(self.id);
30682        __tmp.put_u8(self.chunk_seq);
30683        if matches!(version, MavlinkVersion::V2) {
30684            let len = __tmp.len();
30685            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30686        } else {
30687            __tmp.len()
30688        }
30689    }
30690}
30691#[doc = "id: 261"]
30692#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
30693#[derive(Debug, Clone, PartialEq)]
30694#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30695#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30696pub struct STORAGE_INFORMATION_DATA {
30697    #[doc = "Timestamp (time since system boot)."]
30698    pub time_boot_ms: u32,
30699    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30700    pub total_capacity: f32,
30701    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30702    pub used_capacity: f32,
30703    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30704    pub available_capacity: f32,
30705    #[doc = "Read speed."]
30706    pub read_speed: f32,
30707    #[doc = "Write speed."]
30708    pub write_speed: f32,
30709    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
30710    pub storage_id: u8,
30711    #[doc = "Number of storage devices"]
30712    pub storage_count: u8,
30713    #[doc = "Status of storage"]
30714    pub status: StorageStatus,
30715    #[doc = "Type of storage"]
30716    #[cfg_attr(feature = "serde", serde(default))]
30717    pub mavtype: StorageType,
30718    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
30719    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30720    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30721    pub name: [u8; 32],
30722    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
30723    #[cfg_attr(feature = "serde", serde(default))]
30724    pub storage_usage: StorageUsageFlag,
30725}
30726impl STORAGE_INFORMATION_DATA {
30727    pub const ENCODED_LEN: usize = 61usize;
30728    pub const DEFAULT: Self = Self {
30729        time_boot_ms: 0_u32,
30730        total_capacity: 0.0_f32,
30731        used_capacity: 0.0_f32,
30732        available_capacity: 0.0_f32,
30733        read_speed: 0.0_f32,
30734        write_speed: 0.0_f32,
30735        storage_id: 0_u8,
30736        storage_count: 0_u8,
30737        status: StorageStatus::DEFAULT,
30738        mavtype: StorageType::DEFAULT,
30739        name: [0_u8; 32usize],
30740        storage_usage: StorageUsageFlag::DEFAULT,
30741    };
30742    #[cfg(feature = "arbitrary")]
30743    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30744        use arbitrary::{Arbitrary, Unstructured};
30745        let mut buf = [0u8; 1024];
30746        rng.fill_bytes(&mut buf);
30747        let mut unstructured = Unstructured::new(&buf);
30748        Self::arbitrary(&mut unstructured).unwrap_or_default()
30749    }
30750}
30751impl Default for STORAGE_INFORMATION_DATA {
30752    fn default() -> Self {
30753        Self::DEFAULT.clone()
30754    }
30755}
30756impl MessageData for STORAGE_INFORMATION_DATA {
30757    type Message = MavMessage;
30758    const ID: u32 = 261u32;
30759    const NAME: &'static str = "STORAGE_INFORMATION";
30760    const EXTRA_CRC: u8 = 179u8;
30761    const ENCODED_LEN: usize = 61usize;
30762    fn deser(
30763        _version: MavlinkVersion,
30764        __input: &[u8],
30765    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30766        let avail_len = __input.len();
30767        let mut payload_buf = [0; Self::ENCODED_LEN];
30768        let mut buf = if avail_len < Self::ENCODED_LEN {
30769            payload_buf[0..avail_len].copy_from_slice(__input);
30770            Bytes::new(&payload_buf)
30771        } else {
30772            Bytes::new(__input)
30773        };
30774        let mut __struct = Self::default();
30775        __struct.time_boot_ms = buf.get_u32_le();
30776        __struct.total_capacity = buf.get_f32_le();
30777        __struct.used_capacity = buf.get_f32_le();
30778        __struct.available_capacity = buf.get_f32_le();
30779        __struct.read_speed = buf.get_f32_le();
30780        __struct.write_speed = buf.get_f32_le();
30781        __struct.storage_id = buf.get_u8();
30782        __struct.storage_count = buf.get_u8();
30783        let tmp = buf.get_u8();
30784        __struct.status =
30785            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30786                enum_type: "StorageStatus",
30787                value: tmp as u32,
30788            })?;
30789        let tmp = buf.get_u8();
30790        __struct.mavtype =
30791            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30792                enum_type: "StorageType",
30793                value: tmp as u32,
30794            })?;
30795        for v in &mut __struct.name {
30796            let val = buf.get_u8();
30797            *v = val;
30798        }
30799        let tmp = buf.get_u8();
30800        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
30801            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30802                flag_type: "StorageUsageFlag",
30803                value: tmp as u32,
30804            })?;
30805        Ok(__struct)
30806    }
30807    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30808        let mut __tmp = BytesMut::new(bytes);
30809        #[allow(clippy::absurd_extreme_comparisons)]
30810        #[allow(unused_comparisons)]
30811        if __tmp.remaining() < Self::ENCODED_LEN {
30812            panic!(
30813                "buffer is too small (need {} bytes, but got {})",
30814                Self::ENCODED_LEN,
30815                __tmp.remaining(),
30816            )
30817        }
30818        __tmp.put_u32_le(self.time_boot_ms);
30819        __tmp.put_f32_le(self.total_capacity);
30820        __tmp.put_f32_le(self.used_capacity);
30821        __tmp.put_f32_le(self.available_capacity);
30822        __tmp.put_f32_le(self.read_speed);
30823        __tmp.put_f32_le(self.write_speed);
30824        __tmp.put_u8(self.storage_id);
30825        __tmp.put_u8(self.storage_count);
30826        __tmp.put_u8(self.status as u8);
30827        __tmp.put_u8(self.mavtype as u8);
30828        for val in &self.name {
30829            __tmp.put_u8(*val);
30830        }
30831        __tmp.put_u8(self.storage_usage.bits());
30832        if matches!(version, MavlinkVersion::V2) {
30833            let len = __tmp.len();
30834            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30835        } else {
30836            __tmp.len()
30837        }
30838    }
30839}
30840#[doc = "id: 401"]
30841#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
30842#[derive(Debug, Clone, PartialEq)]
30843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30844#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30845pub struct SUPPORTED_TUNES_DATA {
30846    #[doc = "Bitfield of supported tune formats."]
30847    pub format: TuneFormat,
30848    #[doc = "System ID"]
30849    pub target_system: u8,
30850    #[doc = "Component ID"]
30851    pub target_component: u8,
30852}
30853impl SUPPORTED_TUNES_DATA {
30854    pub const ENCODED_LEN: usize = 6usize;
30855    pub const DEFAULT: Self = Self {
30856        format: TuneFormat::DEFAULT,
30857        target_system: 0_u8,
30858        target_component: 0_u8,
30859    };
30860    #[cfg(feature = "arbitrary")]
30861    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30862        use arbitrary::{Arbitrary, Unstructured};
30863        let mut buf = [0u8; 1024];
30864        rng.fill_bytes(&mut buf);
30865        let mut unstructured = Unstructured::new(&buf);
30866        Self::arbitrary(&mut unstructured).unwrap_or_default()
30867    }
30868}
30869impl Default for SUPPORTED_TUNES_DATA {
30870    fn default() -> Self {
30871        Self::DEFAULT.clone()
30872    }
30873}
30874impl MessageData for SUPPORTED_TUNES_DATA {
30875    type Message = MavMessage;
30876    const ID: u32 = 401u32;
30877    const NAME: &'static str = "SUPPORTED_TUNES";
30878    const EXTRA_CRC: u8 = 183u8;
30879    const ENCODED_LEN: usize = 6usize;
30880    fn deser(
30881        _version: MavlinkVersion,
30882        __input: &[u8],
30883    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30884        let avail_len = __input.len();
30885        let mut payload_buf = [0; Self::ENCODED_LEN];
30886        let mut buf = if avail_len < Self::ENCODED_LEN {
30887            payload_buf[0..avail_len].copy_from_slice(__input);
30888            Bytes::new(&payload_buf)
30889        } else {
30890            Bytes::new(__input)
30891        };
30892        let mut __struct = Self::default();
30893        let tmp = buf.get_u32_le();
30894        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
30895            ::mavlink_core::error::ParserError::InvalidEnum {
30896                enum_type: "TuneFormat",
30897                value: tmp as u32,
30898            },
30899        )?;
30900        __struct.target_system = buf.get_u8();
30901        __struct.target_component = buf.get_u8();
30902        Ok(__struct)
30903    }
30904    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30905        let mut __tmp = BytesMut::new(bytes);
30906        #[allow(clippy::absurd_extreme_comparisons)]
30907        #[allow(unused_comparisons)]
30908        if __tmp.remaining() < Self::ENCODED_LEN {
30909            panic!(
30910                "buffer is too small (need {} bytes, but got {})",
30911                Self::ENCODED_LEN,
30912                __tmp.remaining(),
30913            )
30914        }
30915        __tmp.put_u32_le(self.format as u32);
30916        __tmp.put_u8(self.target_system);
30917        __tmp.put_u8(self.target_component);
30918        if matches!(version, MavlinkVersion::V2) {
30919            let len = __tmp.len();
30920            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30921        } else {
30922            __tmp.len()
30923        }
30924    }
30925}
30926#[doc = "id: 2"]
30927#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
30928#[derive(Debug, Clone, PartialEq)]
30929#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30930#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30931pub struct SYSTEM_TIME_DATA {
30932    #[doc = "Timestamp (UNIX epoch time)."]
30933    pub time_unix_usec: u64,
30934    #[doc = "Timestamp (time since system boot)."]
30935    pub time_boot_ms: u32,
30936}
30937impl SYSTEM_TIME_DATA {
30938    pub const ENCODED_LEN: usize = 12usize;
30939    pub const DEFAULT: Self = Self {
30940        time_unix_usec: 0_u64,
30941        time_boot_ms: 0_u32,
30942    };
30943    #[cfg(feature = "arbitrary")]
30944    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30945        use arbitrary::{Arbitrary, Unstructured};
30946        let mut buf = [0u8; 1024];
30947        rng.fill_bytes(&mut buf);
30948        let mut unstructured = Unstructured::new(&buf);
30949        Self::arbitrary(&mut unstructured).unwrap_or_default()
30950    }
30951}
30952impl Default for SYSTEM_TIME_DATA {
30953    fn default() -> Self {
30954        Self::DEFAULT.clone()
30955    }
30956}
30957impl MessageData for SYSTEM_TIME_DATA {
30958    type Message = MavMessage;
30959    const ID: u32 = 2u32;
30960    const NAME: &'static str = "SYSTEM_TIME";
30961    const EXTRA_CRC: u8 = 137u8;
30962    const ENCODED_LEN: usize = 12usize;
30963    fn deser(
30964        _version: MavlinkVersion,
30965        __input: &[u8],
30966    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30967        let avail_len = __input.len();
30968        let mut payload_buf = [0; Self::ENCODED_LEN];
30969        let mut buf = if avail_len < Self::ENCODED_LEN {
30970            payload_buf[0..avail_len].copy_from_slice(__input);
30971            Bytes::new(&payload_buf)
30972        } else {
30973            Bytes::new(__input)
30974        };
30975        let mut __struct = Self::default();
30976        __struct.time_unix_usec = buf.get_u64_le();
30977        __struct.time_boot_ms = buf.get_u32_le();
30978        Ok(__struct)
30979    }
30980    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30981        let mut __tmp = BytesMut::new(bytes);
30982        #[allow(clippy::absurd_extreme_comparisons)]
30983        #[allow(unused_comparisons)]
30984        if __tmp.remaining() < Self::ENCODED_LEN {
30985            panic!(
30986                "buffer is too small (need {} bytes, but got {})",
30987                Self::ENCODED_LEN,
30988                __tmp.remaining(),
30989            )
30990        }
30991        __tmp.put_u64_le(self.time_unix_usec);
30992        __tmp.put_u32_le(self.time_boot_ms);
30993        if matches!(version, MavlinkVersion::V2) {
30994            let len = __tmp.len();
30995            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30996        } else {
30997            __tmp.len()
30998        }
30999    }
31000}
31001#[doc = "id: 1"]
31002#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
31003#[derive(Debug, Clone, PartialEq)]
31004#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31005#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31006pub struct SYS_STATUS_DATA {
31007    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
31008    pub onboard_control_sensors_present: MavSysStatusSensor,
31009    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
31010    pub onboard_control_sensors_enabled: MavSysStatusSensor,
31011    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
31012    pub onboard_control_sensors_health: MavSysStatusSensor,
31013    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
31014    pub load: u16,
31015    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
31016    pub voltage_battery: u16,
31017    #[doc = "Battery current, -1: Current not sent by autopilot"]
31018    pub current_battery: i16,
31019    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
31020    pub drop_rate_comm: u16,
31021    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
31022    pub errors_comm: u16,
31023    #[doc = "Autopilot-specific errors"]
31024    pub errors_count1: u16,
31025    #[doc = "Autopilot-specific errors"]
31026    pub errors_count2: u16,
31027    #[doc = "Autopilot-specific errors"]
31028    pub errors_count3: u16,
31029    #[doc = "Autopilot-specific errors"]
31030    pub errors_count4: u16,
31031    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
31032    pub battery_remaining: i8,
31033    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
31034    #[cfg_attr(feature = "serde", serde(default))]
31035    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
31036    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
31037    #[cfg_attr(feature = "serde", serde(default))]
31038    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
31039    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
31040    #[cfg_attr(feature = "serde", serde(default))]
31041    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
31042}
31043impl SYS_STATUS_DATA {
31044    pub const ENCODED_LEN: usize = 43usize;
31045    pub const DEFAULT: Self = Self {
31046        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
31047        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
31048        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
31049        load: 0_u16,
31050        voltage_battery: 0_u16,
31051        current_battery: 0_i16,
31052        drop_rate_comm: 0_u16,
31053        errors_comm: 0_u16,
31054        errors_count1: 0_u16,
31055        errors_count2: 0_u16,
31056        errors_count3: 0_u16,
31057        errors_count4: 0_u16,
31058        battery_remaining: 0_i8,
31059        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
31060        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
31061        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
31062    };
31063    #[cfg(feature = "arbitrary")]
31064    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31065        use arbitrary::{Arbitrary, Unstructured};
31066        let mut buf = [0u8; 1024];
31067        rng.fill_bytes(&mut buf);
31068        let mut unstructured = Unstructured::new(&buf);
31069        Self::arbitrary(&mut unstructured).unwrap_or_default()
31070    }
31071}
31072impl Default for SYS_STATUS_DATA {
31073    fn default() -> Self {
31074        Self::DEFAULT.clone()
31075    }
31076}
31077impl MessageData for SYS_STATUS_DATA {
31078    type Message = MavMessage;
31079    const ID: u32 = 1u32;
31080    const NAME: &'static str = "SYS_STATUS";
31081    const EXTRA_CRC: u8 = 124u8;
31082    const ENCODED_LEN: usize = 43usize;
31083    fn deser(
31084        _version: MavlinkVersion,
31085        __input: &[u8],
31086    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31087        let avail_len = __input.len();
31088        let mut payload_buf = [0; Self::ENCODED_LEN];
31089        let mut buf = if avail_len < Self::ENCODED_LEN {
31090            payload_buf[0..avail_len].copy_from_slice(__input);
31091            Bytes::new(&payload_buf)
31092        } else {
31093            Bytes::new(__input)
31094        };
31095        let mut __struct = Self::default();
31096        let tmp = buf.get_u32_le();
31097        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
31098            tmp & MavSysStatusSensor::all().bits(),
31099        )
31100        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31101            flag_type: "MavSysStatusSensor",
31102            value: tmp as u32,
31103        })?;
31104        let tmp = buf.get_u32_le();
31105        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
31106            tmp & MavSysStatusSensor::all().bits(),
31107        )
31108        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31109            flag_type: "MavSysStatusSensor",
31110            value: tmp as u32,
31111        })?;
31112        let tmp = buf.get_u32_le();
31113        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
31114            tmp & MavSysStatusSensor::all().bits(),
31115        )
31116        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31117            flag_type: "MavSysStatusSensor",
31118            value: tmp as u32,
31119        })?;
31120        __struct.load = buf.get_u16_le();
31121        __struct.voltage_battery = buf.get_u16_le();
31122        __struct.current_battery = buf.get_i16_le();
31123        __struct.drop_rate_comm = buf.get_u16_le();
31124        __struct.errors_comm = buf.get_u16_le();
31125        __struct.errors_count1 = buf.get_u16_le();
31126        __struct.errors_count2 = buf.get_u16_le();
31127        __struct.errors_count3 = buf.get_u16_le();
31128        __struct.errors_count4 = buf.get_u16_le();
31129        __struct.battery_remaining = buf.get_i8();
31130        let tmp = buf.get_u32_le();
31131        __struct.onboard_control_sensors_present_extended =
31132            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
31133                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31134                flag_type: "MavSysStatusSensorExtended",
31135                value: tmp as u32,
31136            })?;
31137        let tmp = buf.get_u32_le();
31138        __struct.onboard_control_sensors_enabled_extended =
31139            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
31140                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31141                flag_type: "MavSysStatusSensorExtended",
31142                value: tmp as u32,
31143            })?;
31144        let tmp = buf.get_u32_le();
31145        __struct.onboard_control_sensors_health_extended =
31146            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
31147                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31148                flag_type: "MavSysStatusSensorExtended",
31149                value: tmp as u32,
31150            })?;
31151        Ok(__struct)
31152    }
31153    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31154        let mut __tmp = BytesMut::new(bytes);
31155        #[allow(clippy::absurd_extreme_comparisons)]
31156        #[allow(unused_comparisons)]
31157        if __tmp.remaining() < Self::ENCODED_LEN {
31158            panic!(
31159                "buffer is too small (need {} bytes, but got {})",
31160                Self::ENCODED_LEN,
31161                __tmp.remaining(),
31162            )
31163        }
31164        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
31165        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
31166        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
31167        __tmp.put_u16_le(self.load);
31168        __tmp.put_u16_le(self.voltage_battery);
31169        __tmp.put_i16_le(self.current_battery);
31170        __tmp.put_u16_le(self.drop_rate_comm);
31171        __tmp.put_u16_le(self.errors_comm);
31172        __tmp.put_u16_le(self.errors_count1);
31173        __tmp.put_u16_le(self.errors_count2);
31174        __tmp.put_u16_le(self.errors_count3);
31175        __tmp.put_u16_le(self.errors_count4);
31176        __tmp.put_i8(self.battery_remaining);
31177        __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
31178        __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
31179        __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
31180        if matches!(version, MavlinkVersion::V2) {
31181            let len = __tmp.len();
31182            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31183        } else {
31184            __tmp.len()
31185        }
31186    }
31187}
31188#[doc = "id: 135"]
31189#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
31190#[derive(Debug, Clone, PartialEq)]
31191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31192#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31193pub struct TERRAIN_CHECK_DATA {
31194    #[doc = "Latitude"]
31195    pub lat: i32,
31196    #[doc = "Longitude"]
31197    pub lon: i32,
31198}
31199impl TERRAIN_CHECK_DATA {
31200    pub const ENCODED_LEN: usize = 8usize;
31201    pub const DEFAULT: Self = Self {
31202        lat: 0_i32,
31203        lon: 0_i32,
31204    };
31205    #[cfg(feature = "arbitrary")]
31206    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31207        use arbitrary::{Arbitrary, Unstructured};
31208        let mut buf = [0u8; 1024];
31209        rng.fill_bytes(&mut buf);
31210        let mut unstructured = Unstructured::new(&buf);
31211        Self::arbitrary(&mut unstructured).unwrap_or_default()
31212    }
31213}
31214impl Default for TERRAIN_CHECK_DATA {
31215    fn default() -> Self {
31216        Self::DEFAULT.clone()
31217    }
31218}
31219impl MessageData for TERRAIN_CHECK_DATA {
31220    type Message = MavMessage;
31221    const ID: u32 = 135u32;
31222    const NAME: &'static str = "TERRAIN_CHECK";
31223    const EXTRA_CRC: u8 = 203u8;
31224    const ENCODED_LEN: usize = 8usize;
31225    fn deser(
31226        _version: MavlinkVersion,
31227        __input: &[u8],
31228    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31229        let avail_len = __input.len();
31230        let mut payload_buf = [0; Self::ENCODED_LEN];
31231        let mut buf = if avail_len < Self::ENCODED_LEN {
31232            payload_buf[0..avail_len].copy_from_slice(__input);
31233            Bytes::new(&payload_buf)
31234        } else {
31235            Bytes::new(__input)
31236        };
31237        let mut __struct = Self::default();
31238        __struct.lat = buf.get_i32_le();
31239        __struct.lon = buf.get_i32_le();
31240        Ok(__struct)
31241    }
31242    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31243        let mut __tmp = BytesMut::new(bytes);
31244        #[allow(clippy::absurd_extreme_comparisons)]
31245        #[allow(unused_comparisons)]
31246        if __tmp.remaining() < Self::ENCODED_LEN {
31247            panic!(
31248                "buffer is too small (need {} bytes, but got {})",
31249                Self::ENCODED_LEN,
31250                __tmp.remaining(),
31251            )
31252        }
31253        __tmp.put_i32_le(self.lat);
31254        __tmp.put_i32_le(self.lon);
31255        if matches!(version, MavlinkVersion::V2) {
31256            let len = __tmp.len();
31257            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31258        } else {
31259            __tmp.len()
31260        }
31261    }
31262}
31263#[doc = "id: 134"]
31264#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31265#[derive(Debug, Clone, PartialEq)]
31266#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31268pub struct TERRAIN_DATA_DATA {
31269    #[doc = "Latitude of SW corner of first grid"]
31270    pub lat: i32,
31271    #[doc = "Longitude of SW corner of first grid"]
31272    pub lon: i32,
31273    #[doc = "Grid spacing"]
31274    pub grid_spacing: u16,
31275    #[doc = "Terrain data MSL"]
31276    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31277    pub data: [i16; 16],
31278    #[doc = "bit within the terrain request mask"]
31279    pub gridbit: u8,
31280}
31281impl TERRAIN_DATA_DATA {
31282    pub const ENCODED_LEN: usize = 43usize;
31283    pub const DEFAULT: Self = Self {
31284        lat: 0_i32,
31285        lon: 0_i32,
31286        grid_spacing: 0_u16,
31287        data: [0_i16; 16usize],
31288        gridbit: 0_u8,
31289    };
31290    #[cfg(feature = "arbitrary")]
31291    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31292        use arbitrary::{Arbitrary, Unstructured};
31293        let mut buf = [0u8; 1024];
31294        rng.fill_bytes(&mut buf);
31295        let mut unstructured = Unstructured::new(&buf);
31296        Self::arbitrary(&mut unstructured).unwrap_or_default()
31297    }
31298}
31299impl Default for TERRAIN_DATA_DATA {
31300    fn default() -> Self {
31301        Self::DEFAULT.clone()
31302    }
31303}
31304impl MessageData for TERRAIN_DATA_DATA {
31305    type Message = MavMessage;
31306    const ID: u32 = 134u32;
31307    const NAME: &'static str = "TERRAIN_DATA";
31308    const EXTRA_CRC: u8 = 229u8;
31309    const ENCODED_LEN: usize = 43usize;
31310    fn deser(
31311        _version: MavlinkVersion,
31312        __input: &[u8],
31313    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31314        let avail_len = __input.len();
31315        let mut payload_buf = [0; Self::ENCODED_LEN];
31316        let mut buf = if avail_len < Self::ENCODED_LEN {
31317            payload_buf[0..avail_len].copy_from_slice(__input);
31318            Bytes::new(&payload_buf)
31319        } else {
31320            Bytes::new(__input)
31321        };
31322        let mut __struct = Self::default();
31323        __struct.lat = buf.get_i32_le();
31324        __struct.lon = buf.get_i32_le();
31325        __struct.grid_spacing = buf.get_u16_le();
31326        for v in &mut __struct.data {
31327            let val = buf.get_i16_le();
31328            *v = val;
31329        }
31330        __struct.gridbit = buf.get_u8();
31331        Ok(__struct)
31332    }
31333    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31334        let mut __tmp = BytesMut::new(bytes);
31335        #[allow(clippy::absurd_extreme_comparisons)]
31336        #[allow(unused_comparisons)]
31337        if __tmp.remaining() < Self::ENCODED_LEN {
31338            panic!(
31339                "buffer is too small (need {} bytes, but got {})",
31340                Self::ENCODED_LEN,
31341                __tmp.remaining(),
31342            )
31343        }
31344        __tmp.put_i32_le(self.lat);
31345        __tmp.put_i32_le(self.lon);
31346        __tmp.put_u16_le(self.grid_spacing);
31347        for val in &self.data {
31348            __tmp.put_i16_le(*val);
31349        }
31350        __tmp.put_u8(self.gridbit);
31351        if matches!(version, MavlinkVersion::V2) {
31352            let len = __tmp.len();
31353            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31354        } else {
31355            __tmp.len()
31356        }
31357    }
31358}
31359#[doc = "id: 136"]
31360#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31361#[derive(Debug, Clone, PartialEq)]
31362#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31363#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31364pub struct TERRAIN_REPORT_DATA {
31365    #[doc = "Latitude"]
31366    pub lat: i32,
31367    #[doc = "Longitude"]
31368    pub lon: i32,
31369    #[doc = "Terrain height MSL"]
31370    pub terrain_height: f32,
31371    #[doc = "Current vehicle height above lat/lon terrain height"]
31372    pub current_height: f32,
31373    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
31374    pub spacing: u16,
31375    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
31376    pub pending: u16,
31377    #[doc = "Number of 4x4 terrain blocks in memory"]
31378    pub loaded: u16,
31379}
31380impl TERRAIN_REPORT_DATA {
31381    pub const ENCODED_LEN: usize = 22usize;
31382    pub const DEFAULT: Self = Self {
31383        lat: 0_i32,
31384        lon: 0_i32,
31385        terrain_height: 0.0_f32,
31386        current_height: 0.0_f32,
31387        spacing: 0_u16,
31388        pending: 0_u16,
31389        loaded: 0_u16,
31390    };
31391    #[cfg(feature = "arbitrary")]
31392    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31393        use arbitrary::{Arbitrary, Unstructured};
31394        let mut buf = [0u8; 1024];
31395        rng.fill_bytes(&mut buf);
31396        let mut unstructured = Unstructured::new(&buf);
31397        Self::arbitrary(&mut unstructured).unwrap_or_default()
31398    }
31399}
31400impl Default for TERRAIN_REPORT_DATA {
31401    fn default() -> Self {
31402        Self::DEFAULT.clone()
31403    }
31404}
31405impl MessageData for TERRAIN_REPORT_DATA {
31406    type Message = MavMessage;
31407    const ID: u32 = 136u32;
31408    const NAME: &'static str = "TERRAIN_REPORT";
31409    const EXTRA_CRC: u8 = 1u8;
31410    const ENCODED_LEN: usize = 22usize;
31411    fn deser(
31412        _version: MavlinkVersion,
31413        __input: &[u8],
31414    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31415        let avail_len = __input.len();
31416        let mut payload_buf = [0; Self::ENCODED_LEN];
31417        let mut buf = if avail_len < Self::ENCODED_LEN {
31418            payload_buf[0..avail_len].copy_from_slice(__input);
31419            Bytes::new(&payload_buf)
31420        } else {
31421            Bytes::new(__input)
31422        };
31423        let mut __struct = Self::default();
31424        __struct.lat = buf.get_i32_le();
31425        __struct.lon = buf.get_i32_le();
31426        __struct.terrain_height = buf.get_f32_le();
31427        __struct.current_height = buf.get_f32_le();
31428        __struct.spacing = buf.get_u16_le();
31429        __struct.pending = buf.get_u16_le();
31430        __struct.loaded = buf.get_u16_le();
31431        Ok(__struct)
31432    }
31433    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31434        let mut __tmp = BytesMut::new(bytes);
31435        #[allow(clippy::absurd_extreme_comparisons)]
31436        #[allow(unused_comparisons)]
31437        if __tmp.remaining() < Self::ENCODED_LEN {
31438            panic!(
31439                "buffer is too small (need {} bytes, but got {})",
31440                Self::ENCODED_LEN,
31441                __tmp.remaining(),
31442            )
31443        }
31444        __tmp.put_i32_le(self.lat);
31445        __tmp.put_i32_le(self.lon);
31446        __tmp.put_f32_le(self.terrain_height);
31447        __tmp.put_f32_le(self.current_height);
31448        __tmp.put_u16_le(self.spacing);
31449        __tmp.put_u16_le(self.pending);
31450        __tmp.put_u16_le(self.loaded);
31451        if matches!(version, MavlinkVersion::V2) {
31452            let len = __tmp.len();
31453            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31454        } else {
31455            __tmp.len()
31456        }
31457    }
31458}
31459#[doc = "id: 133"]
31460#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31461#[derive(Debug, Clone, PartialEq)]
31462#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31464pub struct TERRAIN_REQUEST_DATA {
31465    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
31466    pub mask: u64,
31467    #[doc = "Latitude of SW corner of first grid"]
31468    pub lat: i32,
31469    #[doc = "Longitude of SW corner of first grid"]
31470    pub lon: i32,
31471    #[doc = "Grid spacing"]
31472    pub grid_spacing: u16,
31473}
31474impl TERRAIN_REQUEST_DATA {
31475    pub const ENCODED_LEN: usize = 18usize;
31476    pub const DEFAULT: Self = Self {
31477        mask: 0_u64,
31478        lat: 0_i32,
31479        lon: 0_i32,
31480        grid_spacing: 0_u16,
31481    };
31482    #[cfg(feature = "arbitrary")]
31483    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31484        use arbitrary::{Arbitrary, Unstructured};
31485        let mut buf = [0u8; 1024];
31486        rng.fill_bytes(&mut buf);
31487        let mut unstructured = Unstructured::new(&buf);
31488        Self::arbitrary(&mut unstructured).unwrap_or_default()
31489    }
31490}
31491impl Default for TERRAIN_REQUEST_DATA {
31492    fn default() -> Self {
31493        Self::DEFAULT.clone()
31494    }
31495}
31496impl MessageData for TERRAIN_REQUEST_DATA {
31497    type Message = MavMessage;
31498    const ID: u32 = 133u32;
31499    const NAME: &'static str = "TERRAIN_REQUEST";
31500    const EXTRA_CRC: u8 = 6u8;
31501    const ENCODED_LEN: usize = 18usize;
31502    fn deser(
31503        _version: MavlinkVersion,
31504        __input: &[u8],
31505    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31506        let avail_len = __input.len();
31507        let mut payload_buf = [0; Self::ENCODED_LEN];
31508        let mut buf = if avail_len < Self::ENCODED_LEN {
31509            payload_buf[0..avail_len].copy_from_slice(__input);
31510            Bytes::new(&payload_buf)
31511        } else {
31512            Bytes::new(__input)
31513        };
31514        let mut __struct = Self::default();
31515        __struct.mask = buf.get_u64_le();
31516        __struct.lat = buf.get_i32_le();
31517        __struct.lon = buf.get_i32_le();
31518        __struct.grid_spacing = buf.get_u16_le();
31519        Ok(__struct)
31520    }
31521    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31522        let mut __tmp = BytesMut::new(bytes);
31523        #[allow(clippy::absurd_extreme_comparisons)]
31524        #[allow(unused_comparisons)]
31525        if __tmp.remaining() < Self::ENCODED_LEN {
31526            panic!(
31527                "buffer is too small (need {} bytes, but got {})",
31528                Self::ENCODED_LEN,
31529                __tmp.remaining(),
31530            )
31531        }
31532        __tmp.put_u64_le(self.mask);
31533        __tmp.put_i32_le(self.lat);
31534        __tmp.put_i32_le(self.lon);
31535        __tmp.put_u16_le(self.grid_spacing);
31536        if matches!(version, MavlinkVersion::V2) {
31537            let len = __tmp.len();
31538            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31539        } else {
31540            __tmp.len()
31541        }
31542    }
31543}
31544#[doc = "id: 111"]
31545#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
31546#[derive(Debug, Clone, PartialEq)]
31547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31549pub struct TIMESYNC_DATA {
31550    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
31551    pub tc1: i64,
31552    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
31553    pub ts1: i64,
31554    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
31555    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31556    pub target_system: u8,
31557    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
31558    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31559    pub target_component: u8,
31560}
31561impl TIMESYNC_DATA {
31562    pub const ENCODED_LEN: usize = 18usize;
31563    pub const DEFAULT: Self = Self {
31564        tc1: 0_i64,
31565        ts1: 0_i64,
31566        target_system: 0_u8,
31567        target_component: 0_u8,
31568    };
31569    #[cfg(feature = "arbitrary")]
31570    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31571        use arbitrary::{Arbitrary, Unstructured};
31572        let mut buf = [0u8; 1024];
31573        rng.fill_bytes(&mut buf);
31574        let mut unstructured = Unstructured::new(&buf);
31575        Self::arbitrary(&mut unstructured).unwrap_or_default()
31576    }
31577}
31578impl Default for TIMESYNC_DATA {
31579    fn default() -> Self {
31580        Self::DEFAULT.clone()
31581    }
31582}
31583impl MessageData for TIMESYNC_DATA {
31584    type Message = MavMessage;
31585    const ID: u32 = 111u32;
31586    const NAME: &'static str = "TIMESYNC";
31587    const EXTRA_CRC: u8 = 34u8;
31588    const ENCODED_LEN: usize = 18usize;
31589    fn deser(
31590        _version: MavlinkVersion,
31591        __input: &[u8],
31592    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31593        let avail_len = __input.len();
31594        let mut payload_buf = [0; Self::ENCODED_LEN];
31595        let mut buf = if avail_len < Self::ENCODED_LEN {
31596            payload_buf[0..avail_len].copy_from_slice(__input);
31597            Bytes::new(&payload_buf)
31598        } else {
31599            Bytes::new(__input)
31600        };
31601        let mut __struct = Self::default();
31602        __struct.tc1 = buf.get_i64_le();
31603        __struct.ts1 = buf.get_i64_le();
31604        __struct.target_system = buf.get_u8();
31605        __struct.target_component = buf.get_u8();
31606        Ok(__struct)
31607    }
31608    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31609        let mut __tmp = BytesMut::new(bytes);
31610        #[allow(clippy::absurd_extreme_comparisons)]
31611        #[allow(unused_comparisons)]
31612        if __tmp.remaining() < Self::ENCODED_LEN {
31613            panic!(
31614                "buffer is too small (need {} bytes, but got {})",
31615                Self::ENCODED_LEN,
31616                __tmp.remaining(),
31617            )
31618        }
31619        __tmp.put_i64_le(self.tc1);
31620        __tmp.put_i64_le(self.ts1);
31621        __tmp.put_u8(self.target_system);
31622        __tmp.put_u8(self.target_component);
31623        if matches!(version, MavlinkVersion::V2) {
31624            let len = __tmp.len();
31625            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31626        } else {
31627            __tmp.len()
31628        }
31629    }
31630}
31631#[doc = "id: 380"]
31632#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
31633#[derive(Debug, Clone, PartialEq)]
31634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31635#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31636pub struct TIME_ESTIMATE_TO_TARGET_DATA {
31637    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
31638    pub safe_return: i32,
31639    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
31640    pub land: i32,
31641    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
31642    pub mission_next_item: i32,
31643    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
31644    pub mission_end: i32,
31645    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
31646    pub commanded_action: i32,
31647}
31648impl TIME_ESTIMATE_TO_TARGET_DATA {
31649    pub const ENCODED_LEN: usize = 20usize;
31650    pub const DEFAULT: Self = Self {
31651        safe_return: 0_i32,
31652        land: 0_i32,
31653        mission_next_item: 0_i32,
31654        mission_end: 0_i32,
31655        commanded_action: 0_i32,
31656    };
31657    #[cfg(feature = "arbitrary")]
31658    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31659        use arbitrary::{Arbitrary, Unstructured};
31660        let mut buf = [0u8; 1024];
31661        rng.fill_bytes(&mut buf);
31662        let mut unstructured = Unstructured::new(&buf);
31663        Self::arbitrary(&mut unstructured).unwrap_or_default()
31664    }
31665}
31666impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
31667    fn default() -> Self {
31668        Self::DEFAULT.clone()
31669    }
31670}
31671impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
31672    type Message = MavMessage;
31673    const ID: u32 = 380u32;
31674    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
31675    const EXTRA_CRC: u8 = 232u8;
31676    const ENCODED_LEN: usize = 20usize;
31677    fn deser(
31678        _version: MavlinkVersion,
31679        __input: &[u8],
31680    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31681        let avail_len = __input.len();
31682        let mut payload_buf = [0; Self::ENCODED_LEN];
31683        let mut buf = if avail_len < Self::ENCODED_LEN {
31684            payload_buf[0..avail_len].copy_from_slice(__input);
31685            Bytes::new(&payload_buf)
31686        } else {
31687            Bytes::new(__input)
31688        };
31689        let mut __struct = Self::default();
31690        __struct.safe_return = buf.get_i32_le();
31691        __struct.land = buf.get_i32_le();
31692        __struct.mission_next_item = buf.get_i32_le();
31693        __struct.mission_end = buf.get_i32_le();
31694        __struct.commanded_action = buf.get_i32_le();
31695        Ok(__struct)
31696    }
31697    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31698        let mut __tmp = BytesMut::new(bytes);
31699        #[allow(clippy::absurd_extreme_comparisons)]
31700        #[allow(unused_comparisons)]
31701        if __tmp.remaining() < Self::ENCODED_LEN {
31702            panic!(
31703                "buffer is too small (need {} bytes, but got {})",
31704                Self::ENCODED_LEN,
31705                __tmp.remaining(),
31706            )
31707        }
31708        __tmp.put_i32_le(self.safe_return);
31709        __tmp.put_i32_le(self.land);
31710        __tmp.put_i32_le(self.mission_next_item);
31711        __tmp.put_i32_le(self.mission_end);
31712        __tmp.put_i32_le(self.commanded_action);
31713        if matches!(version, MavlinkVersion::V2) {
31714            let len = __tmp.len();
31715            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31716        } else {
31717            __tmp.len()
31718        }
31719    }
31720}
31721#[doc = "id: 333"]
31722#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
31723#[derive(Debug, Clone, PartialEq)]
31724#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31725#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31726pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31727    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31728    pub time_usec: u64,
31729    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
31730    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31731    pub pos_x: [f32; 5],
31732    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
31733    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31734    pub pos_y: [f32; 5],
31735    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
31736    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31737    pub pos_z: [f32; 5],
31738    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
31739    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31740    pub delta: [f32; 5],
31741    #[doc = "Yaw. Set to NaN for unchanged"]
31742    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31743    pub pos_yaw: [f32; 5],
31744    #[doc = "Number of valid control points (up-to 5 points are possible)"]
31745    pub valid_points: u8,
31746}
31747impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31748    pub const ENCODED_LEN: usize = 109usize;
31749    pub const DEFAULT: Self = Self {
31750        time_usec: 0_u64,
31751        pos_x: [0.0_f32; 5usize],
31752        pos_y: [0.0_f32; 5usize],
31753        pos_z: [0.0_f32; 5usize],
31754        delta: [0.0_f32; 5usize],
31755        pos_yaw: [0.0_f32; 5usize],
31756        valid_points: 0_u8,
31757    };
31758    #[cfg(feature = "arbitrary")]
31759    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31760        use arbitrary::{Arbitrary, Unstructured};
31761        let mut buf = [0u8; 1024];
31762        rng.fill_bytes(&mut buf);
31763        let mut unstructured = Unstructured::new(&buf);
31764        Self::arbitrary(&mut unstructured).unwrap_or_default()
31765    }
31766}
31767impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31768    fn default() -> Self {
31769        Self::DEFAULT.clone()
31770    }
31771}
31772impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31773    type Message = MavMessage;
31774    const ID: u32 = 333u32;
31775    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
31776    const EXTRA_CRC: u8 = 231u8;
31777    const ENCODED_LEN: usize = 109usize;
31778    fn deser(
31779        _version: MavlinkVersion,
31780        __input: &[u8],
31781    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31782        let avail_len = __input.len();
31783        let mut payload_buf = [0; Self::ENCODED_LEN];
31784        let mut buf = if avail_len < Self::ENCODED_LEN {
31785            payload_buf[0..avail_len].copy_from_slice(__input);
31786            Bytes::new(&payload_buf)
31787        } else {
31788            Bytes::new(__input)
31789        };
31790        let mut __struct = Self::default();
31791        __struct.time_usec = buf.get_u64_le();
31792        for v in &mut __struct.pos_x {
31793            let val = buf.get_f32_le();
31794            *v = val;
31795        }
31796        for v in &mut __struct.pos_y {
31797            let val = buf.get_f32_le();
31798            *v = val;
31799        }
31800        for v in &mut __struct.pos_z {
31801            let val = buf.get_f32_le();
31802            *v = val;
31803        }
31804        for v in &mut __struct.delta {
31805            let val = buf.get_f32_le();
31806            *v = val;
31807        }
31808        for v in &mut __struct.pos_yaw {
31809            let val = buf.get_f32_le();
31810            *v = val;
31811        }
31812        __struct.valid_points = buf.get_u8();
31813        Ok(__struct)
31814    }
31815    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31816        let mut __tmp = BytesMut::new(bytes);
31817        #[allow(clippy::absurd_extreme_comparisons)]
31818        #[allow(unused_comparisons)]
31819        if __tmp.remaining() < Self::ENCODED_LEN {
31820            panic!(
31821                "buffer is too small (need {} bytes, but got {})",
31822                Self::ENCODED_LEN,
31823                __tmp.remaining(),
31824            )
31825        }
31826        __tmp.put_u64_le(self.time_usec);
31827        for val in &self.pos_x {
31828            __tmp.put_f32_le(*val);
31829        }
31830        for val in &self.pos_y {
31831            __tmp.put_f32_le(*val);
31832        }
31833        for val in &self.pos_z {
31834            __tmp.put_f32_le(*val);
31835        }
31836        for val in &self.delta {
31837            __tmp.put_f32_le(*val);
31838        }
31839        for val in &self.pos_yaw {
31840            __tmp.put_f32_le(*val);
31841        }
31842        __tmp.put_u8(self.valid_points);
31843        if matches!(version, MavlinkVersion::V2) {
31844            let len = __tmp.len();
31845            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31846        } else {
31847            __tmp.len()
31848        }
31849    }
31850}
31851#[doc = "id: 332"]
31852#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
31853#[derive(Debug, Clone, PartialEq)]
31854#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31855#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31856pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31857    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31858    pub time_usec: u64,
31859    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
31860    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31861    pub pos_x: [f32; 5],
31862    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
31863    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31864    pub pos_y: [f32; 5],
31865    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
31866    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31867    pub pos_z: [f32; 5],
31868    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
31869    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31870    pub vel_x: [f32; 5],
31871    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
31872    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31873    pub vel_y: [f32; 5],
31874    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
31875    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31876    pub vel_z: [f32; 5],
31877    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
31878    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31879    pub acc_x: [f32; 5],
31880    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
31881    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31882    pub acc_y: [f32; 5],
31883    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
31884    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31885    pub acc_z: [f32; 5],
31886    #[doc = "Yaw angle, set to NaN if not being used"]
31887    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31888    pub pos_yaw: [f32; 5],
31889    #[doc = "Yaw rate, set to NaN if not being used"]
31890    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31891    pub vel_yaw: [f32; 5],
31892    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
31893    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31894    pub command: [u16; 5],
31895    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
31896    pub valid_points: u8,
31897}
31898impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31899    pub const ENCODED_LEN: usize = 239usize;
31900    pub const DEFAULT: Self = Self {
31901        time_usec: 0_u64,
31902        pos_x: [0.0_f32; 5usize],
31903        pos_y: [0.0_f32; 5usize],
31904        pos_z: [0.0_f32; 5usize],
31905        vel_x: [0.0_f32; 5usize],
31906        vel_y: [0.0_f32; 5usize],
31907        vel_z: [0.0_f32; 5usize],
31908        acc_x: [0.0_f32; 5usize],
31909        acc_y: [0.0_f32; 5usize],
31910        acc_z: [0.0_f32; 5usize],
31911        pos_yaw: [0.0_f32; 5usize],
31912        vel_yaw: [0.0_f32; 5usize],
31913        command: [0_u16; 5usize],
31914        valid_points: 0_u8,
31915    };
31916    #[cfg(feature = "arbitrary")]
31917    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31918        use arbitrary::{Arbitrary, Unstructured};
31919        let mut buf = [0u8; 1024];
31920        rng.fill_bytes(&mut buf);
31921        let mut unstructured = Unstructured::new(&buf);
31922        Self::arbitrary(&mut unstructured).unwrap_or_default()
31923    }
31924}
31925impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31926    fn default() -> Self {
31927        Self::DEFAULT.clone()
31928    }
31929}
31930impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31931    type Message = MavMessage;
31932    const ID: u32 = 332u32;
31933    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
31934    const EXTRA_CRC: u8 = 236u8;
31935    const ENCODED_LEN: usize = 239usize;
31936    fn deser(
31937        _version: MavlinkVersion,
31938        __input: &[u8],
31939    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31940        let avail_len = __input.len();
31941        let mut payload_buf = [0; Self::ENCODED_LEN];
31942        let mut buf = if avail_len < Self::ENCODED_LEN {
31943            payload_buf[0..avail_len].copy_from_slice(__input);
31944            Bytes::new(&payload_buf)
31945        } else {
31946            Bytes::new(__input)
31947        };
31948        let mut __struct = Self::default();
31949        __struct.time_usec = buf.get_u64_le();
31950        for v in &mut __struct.pos_x {
31951            let val = buf.get_f32_le();
31952            *v = val;
31953        }
31954        for v in &mut __struct.pos_y {
31955            let val = buf.get_f32_le();
31956            *v = val;
31957        }
31958        for v in &mut __struct.pos_z {
31959            let val = buf.get_f32_le();
31960            *v = val;
31961        }
31962        for v in &mut __struct.vel_x {
31963            let val = buf.get_f32_le();
31964            *v = val;
31965        }
31966        for v in &mut __struct.vel_y {
31967            let val = buf.get_f32_le();
31968            *v = val;
31969        }
31970        for v in &mut __struct.vel_z {
31971            let val = buf.get_f32_le();
31972            *v = val;
31973        }
31974        for v in &mut __struct.acc_x {
31975            let val = buf.get_f32_le();
31976            *v = val;
31977        }
31978        for v in &mut __struct.acc_y {
31979            let val = buf.get_f32_le();
31980            *v = val;
31981        }
31982        for v in &mut __struct.acc_z {
31983            let val = buf.get_f32_le();
31984            *v = val;
31985        }
31986        for v in &mut __struct.pos_yaw {
31987            let val = buf.get_f32_le();
31988            *v = val;
31989        }
31990        for v in &mut __struct.vel_yaw {
31991            let val = buf.get_f32_le();
31992            *v = val;
31993        }
31994        for v in &mut __struct.command {
31995            let val = buf.get_u16_le();
31996            *v = val;
31997        }
31998        __struct.valid_points = buf.get_u8();
31999        Ok(__struct)
32000    }
32001    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32002        let mut __tmp = BytesMut::new(bytes);
32003        #[allow(clippy::absurd_extreme_comparisons)]
32004        #[allow(unused_comparisons)]
32005        if __tmp.remaining() < Self::ENCODED_LEN {
32006            panic!(
32007                "buffer is too small (need {} bytes, but got {})",
32008                Self::ENCODED_LEN,
32009                __tmp.remaining(),
32010            )
32011        }
32012        __tmp.put_u64_le(self.time_usec);
32013        for val in &self.pos_x {
32014            __tmp.put_f32_le(*val);
32015        }
32016        for val in &self.pos_y {
32017            __tmp.put_f32_le(*val);
32018        }
32019        for val in &self.pos_z {
32020            __tmp.put_f32_le(*val);
32021        }
32022        for val in &self.vel_x {
32023            __tmp.put_f32_le(*val);
32024        }
32025        for val in &self.vel_y {
32026            __tmp.put_f32_le(*val);
32027        }
32028        for val in &self.vel_z {
32029            __tmp.put_f32_le(*val);
32030        }
32031        for val in &self.acc_x {
32032            __tmp.put_f32_le(*val);
32033        }
32034        for val in &self.acc_y {
32035            __tmp.put_f32_le(*val);
32036        }
32037        for val in &self.acc_z {
32038            __tmp.put_f32_le(*val);
32039        }
32040        for val in &self.pos_yaw {
32041            __tmp.put_f32_le(*val);
32042        }
32043        for val in &self.vel_yaw {
32044            __tmp.put_f32_le(*val);
32045        }
32046        for val in &self.command {
32047            __tmp.put_u16_le(*val);
32048        }
32049        __tmp.put_u8(self.valid_points);
32050        if matches!(version, MavlinkVersion::V2) {
32051            let len = __tmp.len();
32052            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32053        } else {
32054            __tmp.len()
32055        }
32056    }
32057}
32058#[doc = "id: 385"]
32059#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
32060#[derive(Debug, Clone, PartialEq)]
32061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32063pub struct TUNNEL_DATA {
32064    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32065    pub payload_type: MavTunnelPayloadType,
32066    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
32067    pub target_system: u8,
32068    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
32069    pub target_component: u8,
32070    #[doc = "Length of the data transported in payload"]
32071    pub payload_length: u8,
32072    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
32073    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32074    pub payload: [u8; 128],
32075}
32076impl TUNNEL_DATA {
32077    pub const ENCODED_LEN: usize = 133usize;
32078    pub const DEFAULT: Self = Self {
32079        payload_type: MavTunnelPayloadType::DEFAULT,
32080        target_system: 0_u8,
32081        target_component: 0_u8,
32082        payload_length: 0_u8,
32083        payload: [0_u8; 128usize],
32084    };
32085    #[cfg(feature = "arbitrary")]
32086    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32087        use arbitrary::{Arbitrary, Unstructured};
32088        let mut buf = [0u8; 1024];
32089        rng.fill_bytes(&mut buf);
32090        let mut unstructured = Unstructured::new(&buf);
32091        Self::arbitrary(&mut unstructured).unwrap_or_default()
32092    }
32093}
32094impl Default for TUNNEL_DATA {
32095    fn default() -> Self {
32096        Self::DEFAULT.clone()
32097    }
32098}
32099impl MessageData for TUNNEL_DATA {
32100    type Message = MavMessage;
32101    const ID: u32 = 385u32;
32102    const NAME: &'static str = "TUNNEL";
32103    const EXTRA_CRC: u8 = 147u8;
32104    const ENCODED_LEN: usize = 133usize;
32105    fn deser(
32106        _version: MavlinkVersion,
32107        __input: &[u8],
32108    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32109        let avail_len = __input.len();
32110        let mut payload_buf = [0; Self::ENCODED_LEN];
32111        let mut buf = if avail_len < Self::ENCODED_LEN {
32112            payload_buf[0..avail_len].copy_from_slice(__input);
32113            Bytes::new(&payload_buf)
32114        } else {
32115            Bytes::new(__input)
32116        };
32117        let mut __struct = Self::default();
32118        let tmp = buf.get_u16_le();
32119        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
32120            ::mavlink_core::error::ParserError::InvalidEnum {
32121                enum_type: "MavTunnelPayloadType",
32122                value: tmp as u32,
32123            },
32124        )?;
32125        __struct.target_system = buf.get_u8();
32126        __struct.target_component = buf.get_u8();
32127        __struct.payload_length = buf.get_u8();
32128        for v in &mut __struct.payload {
32129            let val = buf.get_u8();
32130            *v = val;
32131        }
32132        Ok(__struct)
32133    }
32134    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32135        let mut __tmp = BytesMut::new(bytes);
32136        #[allow(clippy::absurd_extreme_comparisons)]
32137        #[allow(unused_comparisons)]
32138        if __tmp.remaining() < Self::ENCODED_LEN {
32139            panic!(
32140                "buffer is too small (need {} bytes, but got {})",
32141                Self::ENCODED_LEN,
32142                __tmp.remaining(),
32143            )
32144        }
32145        __tmp.put_u16_le(self.payload_type as u16);
32146        __tmp.put_u8(self.target_system);
32147        __tmp.put_u8(self.target_component);
32148        __tmp.put_u8(self.payload_length);
32149        for val in &self.payload {
32150            __tmp.put_u8(*val);
32151        }
32152        if matches!(version, MavlinkVersion::V2) {
32153            let len = __tmp.len();
32154            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32155        } else {
32156            __tmp.len()
32157        }
32158    }
32159}
32160#[doc = "id: 311"]
32161#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
32162#[derive(Debug, Clone, PartialEq)]
32163#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32165pub struct UAVCAN_NODE_INFO_DATA {
32166    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32167    pub time_usec: u64,
32168    #[doc = "Time since the start-up of the node."]
32169    pub uptime_sec: u32,
32170    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
32171    pub sw_vcs_commit: u32,
32172    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
32173    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32174    pub name: [u8; 80],
32175    #[doc = "Hardware major version number."]
32176    pub hw_version_major: u8,
32177    #[doc = "Hardware minor version number."]
32178    pub hw_version_minor: u8,
32179    #[doc = "Hardware unique 128-bit ID."]
32180    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32181    pub hw_unique_id: [u8; 16],
32182    #[doc = "Software major version number."]
32183    pub sw_version_major: u8,
32184    #[doc = "Software minor version number."]
32185    pub sw_version_minor: u8,
32186}
32187impl UAVCAN_NODE_INFO_DATA {
32188    pub const ENCODED_LEN: usize = 116usize;
32189    pub const DEFAULT: Self = Self {
32190        time_usec: 0_u64,
32191        uptime_sec: 0_u32,
32192        sw_vcs_commit: 0_u32,
32193        name: [0_u8; 80usize],
32194        hw_version_major: 0_u8,
32195        hw_version_minor: 0_u8,
32196        hw_unique_id: [0_u8; 16usize],
32197        sw_version_major: 0_u8,
32198        sw_version_minor: 0_u8,
32199    };
32200    #[cfg(feature = "arbitrary")]
32201    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32202        use arbitrary::{Arbitrary, Unstructured};
32203        let mut buf = [0u8; 1024];
32204        rng.fill_bytes(&mut buf);
32205        let mut unstructured = Unstructured::new(&buf);
32206        Self::arbitrary(&mut unstructured).unwrap_or_default()
32207    }
32208}
32209impl Default for UAVCAN_NODE_INFO_DATA {
32210    fn default() -> Self {
32211        Self::DEFAULT.clone()
32212    }
32213}
32214impl MessageData for UAVCAN_NODE_INFO_DATA {
32215    type Message = MavMessage;
32216    const ID: u32 = 311u32;
32217    const NAME: &'static str = "UAVCAN_NODE_INFO";
32218    const EXTRA_CRC: u8 = 95u8;
32219    const ENCODED_LEN: usize = 116usize;
32220    fn deser(
32221        _version: MavlinkVersion,
32222        __input: &[u8],
32223    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32224        let avail_len = __input.len();
32225        let mut payload_buf = [0; Self::ENCODED_LEN];
32226        let mut buf = if avail_len < Self::ENCODED_LEN {
32227            payload_buf[0..avail_len].copy_from_slice(__input);
32228            Bytes::new(&payload_buf)
32229        } else {
32230            Bytes::new(__input)
32231        };
32232        let mut __struct = Self::default();
32233        __struct.time_usec = buf.get_u64_le();
32234        __struct.uptime_sec = buf.get_u32_le();
32235        __struct.sw_vcs_commit = buf.get_u32_le();
32236        for v in &mut __struct.name {
32237            let val = buf.get_u8();
32238            *v = val;
32239        }
32240        __struct.hw_version_major = buf.get_u8();
32241        __struct.hw_version_minor = buf.get_u8();
32242        for v in &mut __struct.hw_unique_id {
32243            let val = buf.get_u8();
32244            *v = val;
32245        }
32246        __struct.sw_version_major = buf.get_u8();
32247        __struct.sw_version_minor = buf.get_u8();
32248        Ok(__struct)
32249    }
32250    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32251        let mut __tmp = BytesMut::new(bytes);
32252        #[allow(clippy::absurd_extreme_comparisons)]
32253        #[allow(unused_comparisons)]
32254        if __tmp.remaining() < Self::ENCODED_LEN {
32255            panic!(
32256                "buffer is too small (need {} bytes, but got {})",
32257                Self::ENCODED_LEN,
32258                __tmp.remaining(),
32259            )
32260        }
32261        __tmp.put_u64_le(self.time_usec);
32262        __tmp.put_u32_le(self.uptime_sec);
32263        __tmp.put_u32_le(self.sw_vcs_commit);
32264        for val in &self.name {
32265            __tmp.put_u8(*val);
32266        }
32267        __tmp.put_u8(self.hw_version_major);
32268        __tmp.put_u8(self.hw_version_minor);
32269        for val in &self.hw_unique_id {
32270            __tmp.put_u8(*val);
32271        }
32272        __tmp.put_u8(self.sw_version_major);
32273        __tmp.put_u8(self.sw_version_minor);
32274        if matches!(version, MavlinkVersion::V2) {
32275            let len = __tmp.len();
32276            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32277        } else {
32278            __tmp.len()
32279        }
32280    }
32281}
32282#[doc = "id: 310"]
32283#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
32284#[derive(Debug, Clone, PartialEq)]
32285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32286#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32287pub struct UAVCAN_NODE_STATUS_DATA {
32288    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32289    pub time_usec: u64,
32290    #[doc = "Time since the start-up of the node."]
32291    pub uptime_sec: u32,
32292    #[doc = "Vendor-specific status information."]
32293    pub vendor_specific_status_code: u16,
32294    #[doc = "Generalized node health status."]
32295    pub health: UavcanNodeHealth,
32296    #[doc = "Generalized operating mode."]
32297    pub mode: UavcanNodeMode,
32298    #[doc = "Not used currently."]
32299    pub sub_mode: u8,
32300}
32301impl UAVCAN_NODE_STATUS_DATA {
32302    pub const ENCODED_LEN: usize = 17usize;
32303    pub const DEFAULT: Self = Self {
32304        time_usec: 0_u64,
32305        uptime_sec: 0_u32,
32306        vendor_specific_status_code: 0_u16,
32307        health: UavcanNodeHealth::DEFAULT,
32308        mode: UavcanNodeMode::DEFAULT,
32309        sub_mode: 0_u8,
32310    };
32311    #[cfg(feature = "arbitrary")]
32312    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32313        use arbitrary::{Arbitrary, Unstructured};
32314        let mut buf = [0u8; 1024];
32315        rng.fill_bytes(&mut buf);
32316        let mut unstructured = Unstructured::new(&buf);
32317        Self::arbitrary(&mut unstructured).unwrap_or_default()
32318    }
32319}
32320impl Default for UAVCAN_NODE_STATUS_DATA {
32321    fn default() -> Self {
32322        Self::DEFAULT.clone()
32323    }
32324}
32325impl MessageData for UAVCAN_NODE_STATUS_DATA {
32326    type Message = MavMessage;
32327    const ID: u32 = 310u32;
32328    const NAME: &'static str = "UAVCAN_NODE_STATUS";
32329    const EXTRA_CRC: u8 = 28u8;
32330    const ENCODED_LEN: usize = 17usize;
32331    fn deser(
32332        _version: MavlinkVersion,
32333        __input: &[u8],
32334    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32335        let avail_len = __input.len();
32336        let mut payload_buf = [0; Self::ENCODED_LEN];
32337        let mut buf = if avail_len < Self::ENCODED_LEN {
32338            payload_buf[0..avail_len].copy_from_slice(__input);
32339            Bytes::new(&payload_buf)
32340        } else {
32341            Bytes::new(__input)
32342        };
32343        let mut __struct = Self::default();
32344        __struct.time_usec = buf.get_u64_le();
32345        __struct.uptime_sec = buf.get_u32_le();
32346        __struct.vendor_specific_status_code = buf.get_u16_le();
32347        let tmp = buf.get_u8();
32348        __struct.health =
32349            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32350                enum_type: "UavcanNodeHealth",
32351                value: tmp as u32,
32352            })?;
32353        let tmp = buf.get_u8();
32354        __struct.mode =
32355            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32356                enum_type: "UavcanNodeMode",
32357                value: tmp as u32,
32358            })?;
32359        __struct.sub_mode = buf.get_u8();
32360        Ok(__struct)
32361    }
32362    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32363        let mut __tmp = BytesMut::new(bytes);
32364        #[allow(clippy::absurd_extreme_comparisons)]
32365        #[allow(unused_comparisons)]
32366        if __tmp.remaining() < Self::ENCODED_LEN {
32367            panic!(
32368                "buffer is too small (need {} bytes, but got {})",
32369                Self::ENCODED_LEN,
32370                __tmp.remaining(),
32371            )
32372        }
32373        __tmp.put_u64_le(self.time_usec);
32374        __tmp.put_u32_le(self.uptime_sec);
32375        __tmp.put_u16_le(self.vendor_specific_status_code);
32376        __tmp.put_u8(self.health as u8);
32377        __tmp.put_u8(self.mode as u8);
32378        __tmp.put_u8(self.sub_mode);
32379        if matches!(version, MavlinkVersion::V2) {
32380            let len = __tmp.len();
32381            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32382        } else {
32383            __tmp.len()
32384        }
32385    }
32386}
32387#[doc = "id: 340"]
32388#[doc = "The global position resulting from GPS and sensor fusion."]
32389#[derive(Debug, Clone, PartialEq)]
32390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32391#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32392pub struct UTM_GLOBAL_POSITION_DATA {
32393    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
32394    pub time: u64,
32395    #[doc = "Latitude (WGS84)"]
32396    pub lat: i32,
32397    #[doc = "Longitude (WGS84)"]
32398    pub lon: i32,
32399    #[doc = "Altitude (WGS84)"]
32400    pub alt: i32,
32401    #[doc = "Altitude above ground"]
32402    pub relative_alt: i32,
32403    #[doc = "Next waypoint, latitude (WGS84)"]
32404    pub next_lat: i32,
32405    #[doc = "Next waypoint, longitude (WGS84)"]
32406    pub next_lon: i32,
32407    #[doc = "Next waypoint, altitude (WGS84)"]
32408    pub next_alt: i32,
32409    #[doc = "Ground X speed (latitude, positive north)"]
32410    pub vx: i16,
32411    #[doc = "Ground Y speed (longitude, positive east)"]
32412    pub vy: i16,
32413    #[doc = "Ground Z speed (altitude, positive down)"]
32414    pub vz: i16,
32415    #[doc = "Horizontal position uncertainty (standard deviation)"]
32416    pub h_acc: u16,
32417    #[doc = "Altitude uncertainty (standard deviation)"]
32418    pub v_acc: u16,
32419    #[doc = "Speed uncertainty (standard deviation)"]
32420    pub vel_acc: u16,
32421    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
32422    pub update_rate: u16,
32423    #[doc = "Unique UAS ID."]
32424    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32425    pub uas_id: [u8; 18],
32426    #[doc = "Flight state"]
32427    pub flight_state: UtmFlightState,
32428    #[doc = "Bitwise OR combination of the data available flags."]
32429    pub flags: UtmDataAvailFlags,
32430}
32431impl UTM_GLOBAL_POSITION_DATA {
32432    pub const ENCODED_LEN: usize = 70usize;
32433    pub const DEFAULT: Self = Self {
32434        time: 0_u64,
32435        lat: 0_i32,
32436        lon: 0_i32,
32437        alt: 0_i32,
32438        relative_alt: 0_i32,
32439        next_lat: 0_i32,
32440        next_lon: 0_i32,
32441        next_alt: 0_i32,
32442        vx: 0_i16,
32443        vy: 0_i16,
32444        vz: 0_i16,
32445        h_acc: 0_u16,
32446        v_acc: 0_u16,
32447        vel_acc: 0_u16,
32448        update_rate: 0_u16,
32449        uas_id: [0_u8; 18usize],
32450        flight_state: UtmFlightState::DEFAULT,
32451        flags: UtmDataAvailFlags::DEFAULT,
32452    };
32453    #[cfg(feature = "arbitrary")]
32454    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32455        use arbitrary::{Arbitrary, Unstructured};
32456        let mut buf = [0u8; 1024];
32457        rng.fill_bytes(&mut buf);
32458        let mut unstructured = Unstructured::new(&buf);
32459        Self::arbitrary(&mut unstructured).unwrap_or_default()
32460    }
32461}
32462impl Default for UTM_GLOBAL_POSITION_DATA {
32463    fn default() -> Self {
32464        Self::DEFAULT.clone()
32465    }
32466}
32467impl MessageData for UTM_GLOBAL_POSITION_DATA {
32468    type Message = MavMessage;
32469    const ID: u32 = 340u32;
32470    const NAME: &'static str = "UTM_GLOBAL_POSITION";
32471    const EXTRA_CRC: u8 = 99u8;
32472    const ENCODED_LEN: usize = 70usize;
32473    fn deser(
32474        _version: MavlinkVersion,
32475        __input: &[u8],
32476    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32477        let avail_len = __input.len();
32478        let mut payload_buf = [0; Self::ENCODED_LEN];
32479        let mut buf = if avail_len < Self::ENCODED_LEN {
32480            payload_buf[0..avail_len].copy_from_slice(__input);
32481            Bytes::new(&payload_buf)
32482        } else {
32483            Bytes::new(__input)
32484        };
32485        let mut __struct = Self::default();
32486        __struct.time = buf.get_u64_le();
32487        __struct.lat = buf.get_i32_le();
32488        __struct.lon = buf.get_i32_le();
32489        __struct.alt = buf.get_i32_le();
32490        __struct.relative_alt = buf.get_i32_le();
32491        __struct.next_lat = buf.get_i32_le();
32492        __struct.next_lon = buf.get_i32_le();
32493        __struct.next_alt = buf.get_i32_le();
32494        __struct.vx = buf.get_i16_le();
32495        __struct.vy = buf.get_i16_le();
32496        __struct.vz = buf.get_i16_le();
32497        __struct.h_acc = buf.get_u16_le();
32498        __struct.v_acc = buf.get_u16_le();
32499        __struct.vel_acc = buf.get_u16_le();
32500        __struct.update_rate = buf.get_u16_le();
32501        for v in &mut __struct.uas_id {
32502            let val = buf.get_u8();
32503            *v = val;
32504        }
32505        let tmp = buf.get_u8();
32506        __struct.flight_state =
32507            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32508                enum_type: "UtmFlightState",
32509                value: tmp as u32,
32510            })?;
32511        let tmp = buf.get_u8();
32512        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
32513            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32514                flag_type: "UtmDataAvailFlags",
32515                value: tmp as u32,
32516            })?;
32517        Ok(__struct)
32518    }
32519    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32520        let mut __tmp = BytesMut::new(bytes);
32521        #[allow(clippy::absurd_extreme_comparisons)]
32522        #[allow(unused_comparisons)]
32523        if __tmp.remaining() < Self::ENCODED_LEN {
32524            panic!(
32525                "buffer is too small (need {} bytes, but got {})",
32526                Self::ENCODED_LEN,
32527                __tmp.remaining(),
32528            )
32529        }
32530        __tmp.put_u64_le(self.time);
32531        __tmp.put_i32_le(self.lat);
32532        __tmp.put_i32_le(self.lon);
32533        __tmp.put_i32_le(self.alt);
32534        __tmp.put_i32_le(self.relative_alt);
32535        __tmp.put_i32_le(self.next_lat);
32536        __tmp.put_i32_le(self.next_lon);
32537        __tmp.put_i32_le(self.next_alt);
32538        __tmp.put_i16_le(self.vx);
32539        __tmp.put_i16_le(self.vy);
32540        __tmp.put_i16_le(self.vz);
32541        __tmp.put_u16_le(self.h_acc);
32542        __tmp.put_u16_le(self.v_acc);
32543        __tmp.put_u16_le(self.vel_acc);
32544        __tmp.put_u16_le(self.update_rate);
32545        for val in &self.uas_id {
32546            __tmp.put_u8(*val);
32547        }
32548        __tmp.put_u8(self.flight_state as u8);
32549        __tmp.put_u8(self.flags.bits());
32550        if matches!(version, MavlinkVersion::V2) {
32551            let len = __tmp.len();
32552            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32553        } else {
32554            __tmp.len()
32555        }
32556    }
32557}
32558#[doc = "id: 248"]
32559#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
32560#[derive(Debug, Clone, PartialEq)]
32561#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32563pub struct V2_EXTENSION_DATA {
32564    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32565    pub message_type: u16,
32566    #[doc = "Network ID (0 for broadcast)"]
32567    pub target_network: u8,
32568    #[doc = "System ID (0 for broadcast)"]
32569    pub target_system: u8,
32570    #[doc = "Component ID (0 for broadcast)"]
32571    pub target_component: u8,
32572    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
32573    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32574    pub payload: [u8; 249],
32575}
32576impl V2_EXTENSION_DATA {
32577    pub const ENCODED_LEN: usize = 254usize;
32578    pub const DEFAULT: Self = Self {
32579        message_type: 0_u16,
32580        target_network: 0_u8,
32581        target_system: 0_u8,
32582        target_component: 0_u8,
32583        payload: [0_u8; 249usize],
32584    };
32585    #[cfg(feature = "arbitrary")]
32586    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32587        use arbitrary::{Arbitrary, Unstructured};
32588        let mut buf = [0u8; 1024];
32589        rng.fill_bytes(&mut buf);
32590        let mut unstructured = Unstructured::new(&buf);
32591        Self::arbitrary(&mut unstructured).unwrap_or_default()
32592    }
32593}
32594impl Default for V2_EXTENSION_DATA {
32595    fn default() -> Self {
32596        Self::DEFAULT.clone()
32597    }
32598}
32599impl MessageData for V2_EXTENSION_DATA {
32600    type Message = MavMessage;
32601    const ID: u32 = 248u32;
32602    const NAME: &'static str = "V2_EXTENSION";
32603    const EXTRA_CRC: u8 = 8u8;
32604    const ENCODED_LEN: usize = 254usize;
32605    fn deser(
32606        _version: MavlinkVersion,
32607        __input: &[u8],
32608    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32609        let avail_len = __input.len();
32610        let mut payload_buf = [0; Self::ENCODED_LEN];
32611        let mut buf = if avail_len < Self::ENCODED_LEN {
32612            payload_buf[0..avail_len].copy_from_slice(__input);
32613            Bytes::new(&payload_buf)
32614        } else {
32615            Bytes::new(__input)
32616        };
32617        let mut __struct = Self::default();
32618        __struct.message_type = buf.get_u16_le();
32619        __struct.target_network = buf.get_u8();
32620        __struct.target_system = buf.get_u8();
32621        __struct.target_component = buf.get_u8();
32622        for v in &mut __struct.payload {
32623            let val = buf.get_u8();
32624            *v = val;
32625        }
32626        Ok(__struct)
32627    }
32628    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32629        let mut __tmp = BytesMut::new(bytes);
32630        #[allow(clippy::absurd_extreme_comparisons)]
32631        #[allow(unused_comparisons)]
32632        if __tmp.remaining() < Self::ENCODED_LEN {
32633            panic!(
32634                "buffer is too small (need {} bytes, but got {})",
32635                Self::ENCODED_LEN,
32636                __tmp.remaining(),
32637            )
32638        }
32639        __tmp.put_u16_le(self.message_type);
32640        __tmp.put_u8(self.target_network);
32641        __tmp.put_u8(self.target_system);
32642        __tmp.put_u8(self.target_component);
32643        for val in &self.payload {
32644            __tmp.put_u8(*val);
32645        }
32646        if matches!(version, MavlinkVersion::V2) {
32647            let len = __tmp.len();
32648            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32649        } else {
32650            __tmp.len()
32651        }
32652    }
32653}
32654#[doc = "id: 74"]
32655#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
32656#[derive(Debug, Clone, PartialEq)]
32657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32658#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32659pub struct VFR_HUD_DATA {
32660    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
32661    pub airspeed: f32,
32662    #[doc = "Current ground speed."]
32663    pub groundspeed: f32,
32664    #[doc = "Current altitude (MSL)."]
32665    pub alt: f32,
32666    #[doc = "Current climb rate."]
32667    pub climb: f32,
32668    #[doc = "Current heading in compass units (0-360, 0=north)."]
32669    pub heading: i16,
32670    #[doc = "Current throttle setting (0 to 100)."]
32671    pub throttle: u16,
32672}
32673impl VFR_HUD_DATA {
32674    pub const ENCODED_LEN: usize = 20usize;
32675    pub const DEFAULT: Self = Self {
32676        airspeed: 0.0_f32,
32677        groundspeed: 0.0_f32,
32678        alt: 0.0_f32,
32679        climb: 0.0_f32,
32680        heading: 0_i16,
32681        throttle: 0_u16,
32682    };
32683    #[cfg(feature = "arbitrary")]
32684    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32685        use arbitrary::{Arbitrary, Unstructured};
32686        let mut buf = [0u8; 1024];
32687        rng.fill_bytes(&mut buf);
32688        let mut unstructured = Unstructured::new(&buf);
32689        Self::arbitrary(&mut unstructured).unwrap_or_default()
32690    }
32691}
32692impl Default for VFR_HUD_DATA {
32693    fn default() -> Self {
32694        Self::DEFAULT.clone()
32695    }
32696}
32697impl MessageData for VFR_HUD_DATA {
32698    type Message = MavMessage;
32699    const ID: u32 = 74u32;
32700    const NAME: &'static str = "VFR_HUD";
32701    const EXTRA_CRC: u8 = 20u8;
32702    const ENCODED_LEN: usize = 20usize;
32703    fn deser(
32704        _version: MavlinkVersion,
32705        __input: &[u8],
32706    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32707        let avail_len = __input.len();
32708        let mut payload_buf = [0; Self::ENCODED_LEN];
32709        let mut buf = if avail_len < Self::ENCODED_LEN {
32710            payload_buf[0..avail_len].copy_from_slice(__input);
32711            Bytes::new(&payload_buf)
32712        } else {
32713            Bytes::new(__input)
32714        };
32715        let mut __struct = Self::default();
32716        __struct.airspeed = buf.get_f32_le();
32717        __struct.groundspeed = buf.get_f32_le();
32718        __struct.alt = buf.get_f32_le();
32719        __struct.climb = buf.get_f32_le();
32720        __struct.heading = buf.get_i16_le();
32721        __struct.throttle = buf.get_u16_le();
32722        Ok(__struct)
32723    }
32724    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32725        let mut __tmp = BytesMut::new(bytes);
32726        #[allow(clippy::absurd_extreme_comparisons)]
32727        #[allow(unused_comparisons)]
32728        if __tmp.remaining() < Self::ENCODED_LEN {
32729            panic!(
32730                "buffer is too small (need {} bytes, but got {})",
32731                Self::ENCODED_LEN,
32732                __tmp.remaining(),
32733            )
32734        }
32735        __tmp.put_f32_le(self.airspeed);
32736        __tmp.put_f32_le(self.groundspeed);
32737        __tmp.put_f32_le(self.alt);
32738        __tmp.put_f32_le(self.climb);
32739        __tmp.put_i16_le(self.heading);
32740        __tmp.put_u16_le(self.throttle);
32741        if matches!(version, MavlinkVersion::V2) {
32742            let len = __tmp.len();
32743            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32744        } else {
32745            __tmp.len()
32746        }
32747    }
32748}
32749#[doc = "id: 241"]
32750#[doc = "Vibration levels and accelerometer clipping."]
32751#[derive(Debug, Clone, PartialEq)]
32752#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32753#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32754pub struct VIBRATION_DATA {
32755    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32756    pub time_usec: u64,
32757    #[doc = "Vibration levels on X-axis"]
32758    pub vibration_x: f32,
32759    #[doc = "Vibration levels on Y-axis"]
32760    pub vibration_y: f32,
32761    #[doc = "Vibration levels on Z-axis"]
32762    pub vibration_z: f32,
32763    #[doc = "first accelerometer clipping count"]
32764    pub clipping_0: u32,
32765    #[doc = "second accelerometer clipping count"]
32766    pub clipping_1: u32,
32767    #[doc = "third accelerometer clipping count"]
32768    pub clipping_2: u32,
32769}
32770impl VIBRATION_DATA {
32771    pub const ENCODED_LEN: usize = 32usize;
32772    pub const DEFAULT: Self = Self {
32773        time_usec: 0_u64,
32774        vibration_x: 0.0_f32,
32775        vibration_y: 0.0_f32,
32776        vibration_z: 0.0_f32,
32777        clipping_0: 0_u32,
32778        clipping_1: 0_u32,
32779        clipping_2: 0_u32,
32780    };
32781    #[cfg(feature = "arbitrary")]
32782    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32783        use arbitrary::{Arbitrary, Unstructured};
32784        let mut buf = [0u8; 1024];
32785        rng.fill_bytes(&mut buf);
32786        let mut unstructured = Unstructured::new(&buf);
32787        Self::arbitrary(&mut unstructured).unwrap_or_default()
32788    }
32789}
32790impl Default for VIBRATION_DATA {
32791    fn default() -> Self {
32792        Self::DEFAULT.clone()
32793    }
32794}
32795impl MessageData for VIBRATION_DATA {
32796    type Message = MavMessage;
32797    const ID: u32 = 241u32;
32798    const NAME: &'static str = "VIBRATION";
32799    const EXTRA_CRC: u8 = 90u8;
32800    const ENCODED_LEN: usize = 32usize;
32801    fn deser(
32802        _version: MavlinkVersion,
32803        __input: &[u8],
32804    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32805        let avail_len = __input.len();
32806        let mut payload_buf = [0; Self::ENCODED_LEN];
32807        let mut buf = if avail_len < Self::ENCODED_LEN {
32808            payload_buf[0..avail_len].copy_from_slice(__input);
32809            Bytes::new(&payload_buf)
32810        } else {
32811            Bytes::new(__input)
32812        };
32813        let mut __struct = Self::default();
32814        __struct.time_usec = buf.get_u64_le();
32815        __struct.vibration_x = buf.get_f32_le();
32816        __struct.vibration_y = buf.get_f32_le();
32817        __struct.vibration_z = buf.get_f32_le();
32818        __struct.clipping_0 = buf.get_u32_le();
32819        __struct.clipping_1 = buf.get_u32_le();
32820        __struct.clipping_2 = buf.get_u32_le();
32821        Ok(__struct)
32822    }
32823    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32824        let mut __tmp = BytesMut::new(bytes);
32825        #[allow(clippy::absurd_extreme_comparisons)]
32826        #[allow(unused_comparisons)]
32827        if __tmp.remaining() < Self::ENCODED_LEN {
32828            panic!(
32829                "buffer is too small (need {} bytes, but got {})",
32830                Self::ENCODED_LEN,
32831                __tmp.remaining(),
32832            )
32833        }
32834        __tmp.put_u64_le(self.time_usec);
32835        __tmp.put_f32_le(self.vibration_x);
32836        __tmp.put_f32_le(self.vibration_y);
32837        __tmp.put_f32_le(self.vibration_z);
32838        __tmp.put_u32_le(self.clipping_0);
32839        __tmp.put_u32_le(self.clipping_1);
32840        __tmp.put_u32_le(self.clipping_2);
32841        if matches!(version, MavlinkVersion::V2) {
32842            let len = __tmp.len();
32843            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32844        } else {
32845            __tmp.len()
32846        }
32847    }
32848}
32849#[doc = "id: 104"]
32850#[doc = "Global position estimate from a Vicon motion system source."]
32851#[derive(Debug, Clone, PartialEq)]
32852#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32853#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32854pub struct VICON_POSITION_ESTIMATE_DATA {
32855    #[doc = "Timestamp (UNIX time or time since system boot)"]
32856    pub usec: u64,
32857    #[doc = "Global X position"]
32858    pub x: f32,
32859    #[doc = "Global Y position"]
32860    pub y: f32,
32861    #[doc = "Global Z position"]
32862    pub z: f32,
32863    #[doc = "Roll angle"]
32864    pub roll: f32,
32865    #[doc = "Pitch angle"]
32866    pub pitch: f32,
32867    #[doc = "Yaw angle"]
32868    pub yaw: f32,
32869    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
32870    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32871    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32872    pub covariance: [f32; 21],
32873}
32874impl VICON_POSITION_ESTIMATE_DATA {
32875    pub const ENCODED_LEN: usize = 116usize;
32876    pub const DEFAULT: Self = Self {
32877        usec: 0_u64,
32878        x: 0.0_f32,
32879        y: 0.0_f32,
32880        z: 0.0_f32,
32881        roll: 0.0_f32,
32882        pitch: 0.0_f32,
32883        yaw: 0.0_f32,
32884        covariance: [0.0_f32; 21usize],
32885    };
32886    #[cfg(feature = "arbitrary")]
32887    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32888        use arbitrary::{Arbitrary, Unstructured};
32889        let mut buf = [0u8; 1024];
32890        rng.fill_bytes(&mut buf);
32891        let mut unstructured = Unstructured::new(&buf);
32892        Self::arbitrary(&mut unstructured).unwrap_or_default()
32893    }
32894}
32895impl Default for VICON_POSITION_ESTIMATE_DATA {
32896    fn default() -> Self {
32897        Self::DEFAULT.clone()
32898    }
32899}
32900impl MessageData for VICON_POSITION_ESTIMATE_DATA {
32901    type Message = MavMessage;
32902    const ID: u32 = 104u32;
32903    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
32904    const EXTRA_CRC: u8 = 56u8;
32905    const ENCODED_LEN: usize = 116usize;
32906    fn deser(
32907        _version: MavlinkVersion,
32908        __input: &[u8],
32909    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32910        let avail_len = __input.len();
32911        let mut payload_buf = [0; Self::ENCODED_LEN];
32912        let mut buf = if avail_len < Self::ENCODED_LEN {
32913            payload_buf[0..avail_len].copy_from_slice(__input);
32914            Bytes::new(&payload_buf)
32915        } else {
32916            Bytes::new(__input)
32917        };
32918        let mut __struct = Self::default();
32919        __struct.usec = buf.get_u64_le();
32920        __struct.x = buf.get_f32_le();
32921        __struct.y = buf.get_f32_le();
32922        __struct.z = buf.get_f32_le();
32923        __struct.roll = buf.get_f32_le();
32924        __struct.pitch = buf.get_f32_le();
32925        __struct.yaw = buf.get_f32_le();
32926        for v in &mut __struct.covariance {
32927            let val = buf.get_f32_le();
32928            *v = val;
32929        }
32930        Ok(__struct)
32931    }
32932    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32933        let mut __tmp = BytesMut::new(bytes);
32934        #[allow(clippy::absurd_extreme_comparisons)]
32935        #[allow(unused_comparisons)]
32936        if __tmp.remaining() < Self::ENCODED_LEN {
32937            panic!(
32938                "buffer is too small (need {} bytes, but got {})",
32939                Self::ENCODED_LEN,
32940                __tmp.remaining(),
32941            )
32942        }
32943        __tmp.put_u64_le(self.usec);
32944        __tmp.put_f32_le(self.x);
32945        __tmp.put_f32_le(self.y);
32946        __tmp.put_f32_le(self.z);
32947        __tmp.put_f32_le(self.roll);
32948        __tmp.put_f32_le(self.pitch);
32949        __tmp.put_f32_le(self.yaw);
32950        for val in &self.covariance {
32951            __tmp.put_f32_le(*val);
32952        }
32953        if matches!(version, MavlinkVersion::V2) {
32954            let len = __tmp.len();
32955            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32956        } else {
32957            __tmp.len()
32958        }
32959    }
32960}
32961#[doc = "id: 269"]
32962#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
32963#[derive(Debug, Clone, PartialEq)]
32964#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32965#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32966pub struct VIDEO_STREAM_INFORMATION_DATA {
32967    #[doc = "Frame rate."]
32968    pub framerate: f32,
32969    #[doc = "Bit rate."]
32970    pub bitrate: u32,
32971    #[doc = "Bitmap of stream status flags."]
32972    pub flags: VideoStreamStatusFlags,
32973    #[doc = "Horizontal resolution."]
32974    pub resolution_h: u16,
32975    #[doc = "Vertical resolution."]
32976    pub resolution_v: u16,
32977    #[doc = "Video image rotation clockwise."]
32978    pub rotation: u16,
32979    #[doc = "Horizontal Field of view."]
32980    pub hfov: u16,
32981    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
32982    pub stream_id: u8,
32983    #[doc = "Number of streams available."]
32984    pub count: u8,
32985    #[doc = "Type of stream."]
32986    pub mavtype: VideoStreamType,
32987    #[doc = "Stream name."]
32988    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32989    pub name: [u8; 32],
32990    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
32991    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32992    pub uri: [u8; 160],
32993    #[doc = "Encoding of stream."]
32994    #[cfg_attr(feature = "serde", serde(default))]
32995    pub encoding: VideoStreamEncoding,
32996    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
32997    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32998    pub camera_device_id: u8,
32999}
33000impl VIDEO_STREAM_INFORMATION_DATA {
33001    pub const ENCODED_LEN: usize = 215usize;
33002    pub const DEFAULT: Self = Self {
33003        framerate: 0.0_f32,
33004        bitrate: 0_u32,
33005        flags: VideoStreamStatusFlags::DEFAULT,
33006        resolution_h: 0_u16,
33007        resolution_v: 0_u16,
33008        rotation: 0_u16,
33009        hfov: 0_u16,
33010        stream_id: 0_u8,
33011        count: 0_u8,
33012        mavtype: VideoStreamType::DEFAULT,
33013        name: [0_u8; 32usize],
33014        uri: [0_u8; 160usize],
33015        encoding: VideoStreamEncoding::DEFAULT,
33016        camera_device_id: 0_u8,
33017    };
33018    #[cfg(feature = "arbitrary")]
33019    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33020        use arbitrary::{Arbitrary, Unstructured};
33021        let mut buf = [0u8; 1024];
33022        rng.fill_bytes(&mut buf);
33023        let mut unstructured = Unstructured::new(&buf);
33024        Self::arbitrary(&mut unstructured).unwrap_or_default()
33025    }
33026}
33027impl Default for VIDEO_STREAM_INFORMATION_DATA {
33028    fn default() -> Self {
33029        Self::DEFAULT.clone()
33030    }
33031}
33032impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
33033    type Message = MavMessage;
33034    const ID: u32 = 269u32;
33035    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
33036    const EXTRA_CRC: u8 = 109u8;
33037    const ENCODED_LEN: usize = 215usize;
33038    fn deser(
33039        _version: MavlinkVersion,
33040        __input: &[u8],
33041    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33042        let avail_len = __input.len();
33043        let mut payload_buf = [0; Self::ENCODED_LEN];
33044        let mut buf = if avail_len < Self::ENCODED_LEN {
33045            payload_buf[0..avail_len].copy_from_slice(__input);
33046            Bytes::new(&payload_buf)
33047        } else {
33048            Bytes::new(__input)
33049        };
33050        let mut __struct = Self::default();
33051        __struct.framerate = buf.get_f32_le();
33052        __struct.bitrate = buf.get_u32_le();
33053        let tmp = buf.get_u16_le();
33054        __struct.flags = VideoStreamStatusFlags::from_bits(
33055            tmp & VideoStreamStatusFlags::all().bits(),
33056        )
33057        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33058            flag_type: "VideoStreamStatusFlags",
33059            value: tmp as u32,
33060        })?;
33061        __struct.resolution_h = buf.get_u16_le();
33062        __struct.resolution_v = buf.get_u16_le();
33063        __struct.rotation = buf.get_u16_le();
33064        __struct.hfov = buf.get_u16_le();
33065        __struct.stream_id = buf.get_u8();
33066        __struct.count = buf.get_u8();
33067        let tmp = buf.get_u8();
33068        __struct.mavtype =
33069            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33070                enum_type: "VideoStreamType",
33071                value: tmp as u32,
33072            })?;
33073        for v in &mut __struct.name {
33074            let val = buf.get_u8();
33075            *v = val;
33076        }
33077        for v in &mut __struct.uri {
33078            let val = buf.get_u8();
33079            *v = val;
33080        }
33081        let tmp = buf.get_u8();
33082        __struct.encoding =
33083            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33084                enum_type: "VideoStreamEncoding",
33085                value: tmp as u32,
33086            })?;
33087        __struct.camera_device_id = buf.get_u8();
33088        Ok(__struct)
33089    }
33090    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33091        let mut __tmp = BytesMut::new(bytes);
33092        #[allow(clippy::absurd_extreme_comparisons)]
33093        #[allow(unused_comparisons)]
33094        if __tmp.remaining() < Self::ENCODED_LEN {
33095            panic!(
33096                "buffer is too small (need {} bytes, but got {})",
33097                Self::ENCODED_LEN,
33098                __tmp.remaining(),
33099            )
33100        }
33101        __tmp.put_f32_le(self.framerate);
33102        __tmp.put_u32_le(self.bitrate);
33103        __tmp.put_u16_le(self.flags.bits());
33104        __tmp.put_u16_le(self.resolution_h);
33105        __tmp.put_u16_le(self.resolution_v);
33106        __tmp.put_u16_le(self.rotation);
33107        __tmp.put_u16_le(self.hfov);
33108        __tmp.put_u8(self.stream_id);
33109        __tmp.put_u8(self.count);
33110        __tmp.put_u8(self.mavtype as u8);
33111        for val in &self.name {
33112            __tmp.put_u8(*val);
33113        }
33114        for val in &self.uri {
33115            __tmp.put_u8(*val);
33116        }
33117        __tmp.put_u8(self.encoding as u8);
33118        __tmp.put_u8(self.camera_device_id);
33119        if matches!(version, MavlinkVersion::V2) {
33120            let len = __tmp.len();
33121            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33122        } else {
33123            __tmp.len()
33124        }
33125    }
33126}
33127#[doc = "id: 270"]
33128#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33129#[derive(Debug, Clone, PartialEq)]
33130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33131#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33132pub struct VIDEO_STREAM_STATUS_DATA {
33133    #[doc = "Frame rate"]
33134    pub framerate: f32,
33135    #[doc = "Bit rate"]
33136    pub bitrate: u32,
33137    #[doc = "Bitmap of stream status flags"]
33138    pub flags: VideoStreamStatusFlags,
33139    #[doc = "Horizontal resolution"]
33140    pub resolution_h: u16,
33141    #[doc = "Vertical resolution"]
33142    pub resolution_v: u16,
33143    #[doc = "Video image rotation clockwise"]
33144    pub rotation: u16,
33145    #[doc = "Horizontal Field of view"]
33146    pub hfov: u16,
33147    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
33148    pub stream_id: u8,
33149    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
33150    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33151    pub camera_device_id: u8,
33152}
33153impl VIDEO_STREAM_STATUS_DATA {
33154    pub const ENCODED_LEN: usize = 20usize;
33155    pub const DEFAULT: Self = Self {
33156        framerate: 0.0_f32,
33157        bitrate: 0_u32,
33158        flags: VideoStreamStatusFlags::DEFAULT,
33159        resolution_h: 0_u16,
33160        resolution_v: 0_u16,
33161        rotation: 0_u16,
33162        hfov: 0_u16,
33163        stream_id: 0_u8,
33164        camera_device_id: 0_u8,
33165    };
33166    #[cfg(feature = "arbitrary")]
33167    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33168        use arbitrary::{Arbitrary, Unstructured};
33169        let mut buf = [0u8; 1024];
33170        rng.fill_bytes(&mut buf);
33171        let mut unstructured = Unstructured::new(&buf);
33172        Self::arbitrary(&mut unstructured).unwrap_or_default()
33173    }
33174}
33175impl Default for VIDEO_STREAM_STATUS_DATA {
33176    fn default() -> Self {
33177        Self::DEFAULT.clone()
33178    }
33179}
33180impl MessageData for VIDEO_STREAM_STATUS_DATA {
33181    type Message = MavMessage;
33182    const ID: u32 = 270u32;
33183    const NAME: &'static str = "VIDEO_STREAM_STATUS";
33184    const EXTRA_CRC: u8 = 59u8;
33185    const ENCODED_LEN: usize = 20usize;
33186    fn deser(
33187        _version: MavlinkVersion,
33188        __input: &[u8],
33189    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33190        let avail_len = __input.len();
33191        let mut payload_buf = [0; Self::ENCODED_LEN];
33192        let mut buf = if avail_len < Self::ENCODED_LEN {
33193            payload_buf[0..avail_len].copy_from_slice(__input);
33194            Bytes::new(&payload_buf)
33195        } else {
33196            Bytes::new(__input)
33197        };
33198        let mut __struct = Self::default();
33199        __struct.framerate = buf.get_f32_le();
33200        __struct.bitrate = buf.get_u32_le();
33201        let tmp = buf.get_u16_le();
33202        __struct.flags = VideoStreamStatusFlags::from_bits(
33203            tmp & VideoStreamStatusFlags::all().bits(),
33204        )
33205        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33206            flag_type: "VideoStreamStatusFlags",
33207            value: tmp as u32,
33208        })?;
33209        __struct.resolution_h = buf.get_u16_le();
33210        __struct.resolution_v = buf.get_u16_le();
33211        __struct.rotation = buf.get_u16_le();
33212        __struct.hfov = buf.get_u16_le();
33213        __struct.stream_id = buf.get_u8();
33214        __struct.camera_device_id = buf.get_u8();
33215        Ok(__struct)
33216    }
33217    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33218        let mut __tmp = BytesMut::new(bytes);
33219        #[allow(clippy::absurd_extreme_comparisons)]
33220        #[allow(unused_comparisons)]
33221        if __tmp.remaining() < Self::ENCODED_LEN {
33222            panic!(
33223                "buffer is too small (need {} bytes, but got {})",
33224                Self::ENCODED_LEN,
33225                __tmp.remaining(),
33226            )
33227        }
33228        __tmp.put_f32_le(self.framerate);
33229        __tmp.put_u32_le(self.bitrate);
33230        __tmp.put_u16_le(self.flags.bits());
33231        __tmp.put_u16_le(self.resolution_h);
33232        __tmp.put_u16_le(self.resolution_v);
33233        __tmp.put_u16_le(self.rotation);
33234        __tmp.put_u16_le(self.hfov);
33235        __tmp.put_u8(self.stream_id);
33236        __tmp.put_u8(self.camera_device_id);
33237        if matches!(version, MavlinkVersion::V2) {
33238            let len = __tmp.len();
33239            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33240        } else {
33241            __tmp.len()
33242        }
33243    }
33244}
33245#[doc = "id: 102"]
33246#[doc = "Local position/attitude estimate from a vision source."]
33247#[derive(Debug, Clone, PartialEq)]
33248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33250pub struct VISION_POSITION_ESTIMATE_DATA {
33251    #[doc = "Timestamp (UNIX time or time since system boot)"]
33252    pub usec: u64,
33253    #[doc = "Local X position"]
33254    pub x: f32,
33255    #[doc = "Local Y position"]
33256    pub y: f32,
33257    #[doc = "Local Z position"]
33258    pub z: f32,
33259    #[doc = "Roll angle"]
33260    pub roll: f32,
33261    #[doc = "Pitch angle"]
33262    pub pitch: f32,
33263    #[doc = "Yaw angle"]
33264    pub yaw: f32,
33265    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
33266    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33267    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33268    pub covariance: [f32; 21],
33269    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33270    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33271    pub reset_counter: u8,
33272}
33273impl VISION_POSITION_ESTIMATE_DATA {
33274    pub const ENCODED_LEN: usize = 117usize;
33275    pub const DEFAULT: Self = Self {
33276        usec: 0_u64,
33277        x: 0.0_f32,
33278        y: 0.0_f32,
33279        z: 0.0_f32,
33280        roll: 0.0_f32,
33281        pitch: 0.0_f32,
33282        yaw: 0.0_f32,
33283        covariance: [0.0_f32; 21usize],
33284        reset_counter: 0_u8,
33285    };
33286    #[cfg(feature = "arbitrary")]
33287    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33288        use arbitrary::{Arbitrary, Unstructured};
33289        let mut buf = [0u8; 1024];
33290        rng.fill_bytes(&mut buf);
33291        let mut unstructured = Unstructured::new(&buf);
33292        Self::arbitrary(&mut unstructured).unwrap_or_default()
33293    }
33294}
33295impl Default for VISION_POSITION_ESTIMATE_DATA {
33296    fn default() -> Self {
33297        Self::DEFAULT.clone()
33298    }
33299}
33300impl MessageData for VISION_POSITION_ESTIMATE_DATA {
33301    type Message = MavMessage;
33302    const ID: u32 = 102u32;
33303    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
33304    const EXTRA_CRC: u8 = 158u8;
33305    const ENCODED_LEN: usize = 117usize;
33306    fn deser(
33307        _version: MavlinkVersion,
33308        __input: &[u8],
33309    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33310        let avail_len = __input.len();
33311        let mut payload_buf = [0; Self::ENCODED_LEN];
33312        let mut buf = if avail_len < Self::ENCODED_LEN {
33313            payload_buf[0..avail_len].copy_from_slice(__input);
33314            Bytes::new(&payload_buf)
33315        } else {
33316            Bytes::new(__input)
33317        };
33318        let mut __struct = Self::default();
33319        __struct.usec = buf.get_u64_le();
33320        __struct.x = buf.get_f32_le();
33321        __struct.y = buf.get_f32_le();
33322        __struct.z = buf.get_f32_le();
33323        __struct.roll = buf.get_f32_le();
33324        __struct.pitch = buf.get_f32_le();
33325        __struct.yaw = buf.get_f32_le();
33326        for v in &mut __struct.covariance {
33327            let val = buf.get_f32_le();
33328            *v = val;
33329        }
33330        __struct.reset_counter = buf.get_u8();
33331        Ok(__struct)
33332    }
33333    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33334        let mut __tmp = BytesMut::new(bytes);
33335        #[allow(clippy::absurd_extreme_comparisons)]
33336        #[allow(unused_comparisons)]
33337        if __tmp.remaining() < Self::ENCODED_LEN {
33338            panic!(
33339                "buffer is too small (need {} bytes, but got {})",
33340                Self::ENCODED_LEN,
33341                __tmp.remaining(),
33342            )
33343        }
33344        __tmp.put_u64_le(self.usec);
33345        __tmp.put_f32_le(self.x);
33346        __tmp.put_f32_le(self.y);
33347        __tmp.put_f32_le(self.z);
33348        __tmp.put_f32_le(self.roll);
33349        __tmp.put_f32_le(self.pitch);
33350        __tmp.put_f32_le(self.yaw);
33351        for val in &self.covariance {
33352            __tmp.put_f32_le(*val);
33353        }
33354        __tmp.put_u8(self.reset_counter);
33355        if matches!(version, MavlinkVersion::V2) {
33356            let len = __tmp.len();
33357            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33358        } else {
33359            __tmp.len()
33360        }
33361    }
33362}
33363#[doc = "id: 103"]
33364#[doc = "Speed estimate from a vision source."]
33365#[derive(Debug, Clone, PartialEq)]
33366#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33368pub struct VISION_SPEED_ESTIMATE_DATA {
33369    #[doc = "Timestamp (UNIX time or time since system boot)"]
33370    pub usec: u64,
33371    #[doc = "Global X speed"]
33372    pub x: f32,
33373    #[doc = "Global Y speed"]
33374    pub y: f32,
33375    #[doc = "Global Z speed"]
33376    pub z: f32,
33377    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
33378    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33379    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33380    pub covariance: [f32; 9],
33381    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33382    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33383    pub reset_counter: u8,
33384}
33385impl VISION_SPEED_ESTIMATE_DATA {
33386    pub const ENCODED_LEN: usize = 57usize;
33387    pub const DEFAULT: Self = Self {
33388        usec: 0_u64,
33389        x: 0.0_f32,
33390        y: 0.0_f32,
33391        z: 0.0_f32,
33392        covariance: [0.0_f32; 9usize],
33393        reset_counter: 0_u8,
33394    };
33395    #[cfg(feature = "arbitrary")]
33396    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33397        use arbitrary::{Arbitrary, Unstructured};
33398        let mut buf = [0u8; 1024];
33399        rng.fill_bytes(&mut buf);
33400        let mut unstructured = Unstructured::new(&buf);
33401        Self::arbitrary(&mut unstructured).unwrap_or_default()
33402    }
33403}
33404impl Default for VISION_SPEED_ESTIMATE_DATA {
33405    fn default() -> Self {
33406        Self::DEFAULT.clone()
33407    }
33408}
33409impl MessageData for VISION_SPEED_ESTIMATE_DATA {
33410    type Message = MavMessage;
33411    const ID: u32 = 103u32;
33412    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
33413    const EXTRA_CRC: u8 = 208u8;
33414    const ENCODED_LEN: usize = 57usize;
33415    fn deser(
33416        _version: MavlinkVersion,
33417        __input: &[u8],
33418    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33419        let avail_len = __input.len();
33420        let mut payload_buf = [0; Self::ENCODED_LEN];
33421        let mut buf = if avail_len < Self::ENCODED_LEN {
33422            payload_buf[0..avail_len].copy_from_slice(__input);
33423            Bytes::new(&payload_buf)
33424        } else {
33425            Bytes::new(__input)
33426        };
33427        let mut __struct = Self::default();
33428        __struct.usec = buf.get_u64_le();
33429        __struct.x = buf.get_f32_le();
33430        __struct.y = buf.get_f32_le();
33431        __struct.z = buf.get_f32_le();
33432        for v in &mut __struct.covariance {
33433            let val = buf.get_f32_le();
33434            *v = val;
33435        }
33436        __struct.reset_counter = buf.get_u8();
33437        Ok(__struct)
33438    }
33439    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33440        let mut __tmp = BytesMut::new(bytes);
33441        #[allow(clippy::absurd_extreme_comparisons)]
33442        #[allow(unused_comparisons)]
33443        if __tmp.remaining() < Self::ENCODED_LEN {
33444            panic!(
33445                "buffer is too small (need {} bytes, but got {})",
33446                Self::ENCODED_LEN,
33447                __tmp.remaining(),
33448            )
33449        }
33450        __tmp.put_u64_le(self.usec);
33451        __tmp.put_f32_le(self.x);
33452        __tmp.put_f32_le(self.y);
33453        __tmp.put_f32_le(self.z);
33454        for val in &self.covariance {
33455            __tmp.put_f32_le(*val);
33456        }
33457        __tmp.put_u8(self.reset_counter);
33458        if matches!(version, MavlinkVersion::V2) {
33459            let len = __tmp.len();
33460            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33461        } else {
33462            __tmp.len()
33463        }
33464    }
33465}
33466#[doc = "id: 9000"]
33467#[doc = "Cumulative distance traveled for each reported wheel."]
33468#[derive(Debug, Clone, PartialEq)]
33469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33471pub struct WHEEL_DISTANCE_DATA {
33472    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33473    pub time_usec: u64,
33474    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
33475    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33476    pub distance: [f64; 16],
33477    #[doc = "Number of wheels reported."]
33478    pub count: u8,
33479}
33480impl WHEEL_DISTANCE_DATA {
33481    pub const ENCODED_LEN: usize = 137usize;
33482    pub const DEFAULT: Self = Self {
33483        time_usec: 0_u64,
33484        distance: [0.0_f64; 16usize],
33485        count: 0_u8,
33486    };
33487    #[cfg(feature = "arbitrary")]
33488    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33489        use arbitrary::{Arbitrary, Unstructured};
33490        let mut buf = [0u8; 1024];
33491        rng.fill_bytes(&mut buf);
33492        let mut unstructured = Unstructured::new(&buf);
33493        Self::arbitrary(&mut unstructured).unwrap_or_default()
33494    }
33495}
33496impl Default for WHEEL_DISTANCE_DATA {
33497    fn default() -> Self {
33498        Self::DEFAULT.clone()
33499    }
33500}
33501impl MessageData for WHEEL_DISTANCE_DATA {
33502    type Message = MavMessage;
33503    const ID: u32 = 9000u32;
33504    const NAME: &'static str = "WHEEL_DISTANCE";
33505    const EXTRA_CRC: u8 = 113u8;
33506    const ENCODED_LEN: usize = 137usize;
33507    fn deser(
33508        _version: MavlinkVersion,
33509        __input: &[u8],
33510    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33511        let avail_len = __input.len();
33512        let mut payload_buf = [0; Self::ENCODED_LEN];
33513        let mut buf = if avail_len < Self::ENCODED_LEN {
33514            payload_buf[0..avail_len].copy_from_slice(__input);
33515            Bytes::new(&payload_buf)
33516        } else {
33517            Bytes::new(__input)
33518        };
33519        let mut __struct = Self::default();
33520        __struct.time_usec = buf.get_u64_le();
33521        for v in &mut __struct.distance {
33522            let val = buf.get_f64_le();
33523            *v = val;
33524        }
33525        __struct.count = buf.get_u8();
33526        Ok(__struct)
33527    }
33528    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33529        let mut __tmp = BytesMut::new(bytes);
33530        #[allow(clippy::absurd_extreme_comparisons)]
33531        #[allow(unused_comparisons)]
33532        if __tmp.remaining() < Self::ENCODED_LEN {
33533            panic!(
33534                "buffer is too small (need {} bytes, but got {})",
33535                Self::ENCODED_LEN,
33536                __tmp.remaining(),
33537            )
33538        }
33539        __tmp.put_u64_le(self.time_usec);
33540        for val in &self.distance {
33541            __tmp.put_f64_le(*val);
33542        }
33543        __tmp.put_u8(self.count);
33544        if matches!(version, MavlinkVersion::V2) {
33545            let len = __tmp.len();
33546            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33547        } else {
33548            __tmp.len()
33549        }
33550    }
33551}
33552#[doc = "id: 299"]
33553#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33554#[derive(Debug, Clone, PartialEq)]
33555#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33557pub struct WIFI_CONFIG_AP_DATA {
33558    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
33559    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33560    pub ssid: [u8; 32],
33561    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
33562    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33563    pub password: [u8; 64],
33564    #[doc = "WiFi Mode."]
33565    #[cfg_attr(feature = "serde", serde(default))]
33566    pub mode: WifiConfigApMode,
33567    #[doc = "Message acceptance response (sent back to GS)."]
33568    #[cfg_attr(feature = "serde", serde(default))]
33569    pub response: WifiConfigApResponse,
33570}
33571impl WIFI_CONFIG_AP_DATA {
33572    pub const ENCODED_LEN: usize = 98usize;
33573    pub const DEFAULT: Self = Self {
33574        ssid: [0_u8; 32usize],
33575        password: [0_u8; 64usize],
33576        mode: WifiConfigApMode::DEFAULT,
33577        response: WifiConfigApResponse::DEFAULT,
33578    };
33579    #[cfg(feature = "arbitrary")]
33580    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33581        use arbitrary::{Arbitrary, Unstructured};
33582        let mut buf = [0u8; 1024];
33583        rng.fill_bytes(&mut buf);
33584        let mut unstructured = Unstructured::new(&buf);
33585        Self::arbitrary(&mut unstructured).unwrap_or_default()
33586    }
33587}
33588impl Default for WIFI_CONFIG_AP_DATA {
33589    fn default() -> Self {
33590        Self::DEFAULT.clone()
33591    }
33592}
33593impl MessageData for WIFI_CONFIG_AP_DATA {
33594    type Message = MavMessage;
33595    const ID: u32 = 299u32;
33596    const NAME: &'static str = "WIFI_CONFIG_AP";
33597    const EXTRA_CRC: u8 = 19u8;
33598    const ENCODED_LEN: usize = 98usize;
33599    fn deser(
33600        _version: MavlinkVersion,
33601        __input: &[u8],
33602    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33603        let avail_len = __input.len();
33604        let mut payload_buf = [0; Self::ENCODED_LEN];
33605        let mut buf = if avail_len < Self::ENCODED_LEN {
33606            payload_buf[0..avail_len].copy_from_slice(__input);
33607            Bytes::new(&payload_buf)
33608        } else {
33609            Bytes::new(__input)
33610        };
33611        let mut __struct = Self::default();
33612        for v in &mut __struct.ssid {
33613            let val = buf.get_u8();
33614            *v = val;
33615        }
33616        for v in &mut __struct.password {
33617            let val = buf.get_u8();
33618            *v = val;
33619        }
33620        let tmp = buf.get_i8();
33621        __struct.mode =
33622            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33623                enum_type: "WifiConfigApMode",
33624                value: tmp as u32,
33625            })?;
33626        let tmp = buf.get_i8();
33627        __struct.response =
33628            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33629                enum_type: "WifiConfigApResponse",
33630                value: tmp as u32,
33631            })?;
33632        Ok(__struct)
33633    }
33634    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33635        let mut __tmp = BytesMut::new(bytes);
33636        #[allow(clippy::absurd_extreme_comparisons)]
33637        #[allow(unused_comparisons)]
33638        if __tmp.remaining() < Self::ENCODED_LEN {
33639            panic!(
33640                "buffer is too small (need {} bytes, but got {})",
33641                Self::ENCODED_LEN,
33642                __tmp.remaining(),
33643            )
33644        }
33645        for val in &self.ssid {
33646            __tmp.put_u8(*val);
33647        }
33648        for val in &self.password {
33649            __tmp.put_u8(*val);
33650        }
33651        __tmp.put_i8(self.mode as i8);
33652        __tmp.put_i8(self.response as i8);
33653        if matches!(version, MavlinkVersion::V2) {
33654            let len = __tmp.len();
33655            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33656        } else {
33657            __tmp.len()
33658        }
33659    }
33660}
33661#[doc = "id: 9005"]
33662#[doc = "Winch status."]
33663#[derive(Debug, Clone, PartialEq)]
33664#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33665#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33666pub struct WINCH_STATUS_DATA {
33667    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33668    pub time_usec: u64,
33669    #[doc = "Length of line released. NaN if unknown"]
33670    pub line_length: f32,
33671    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
33672    pub speed: f32,
33673    #[doc = "Tension on the line. NaN if unknown"]
33674    pub tension: f32,
33675    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
33676    pub voltage: f32,
33677    #[doc = "Current draw from the winch. NaN if unknown"]
33678    pub current: f32,
33679    #[doc = "Status flags"]
33680    pub status: MavWinchStatusFlag,
33681    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
33682    pub temperature: i16,
33683}
33684impl WINCH_STATUS_DATA {
33685    pub const ENCODED_LEN: usize = 34usize;
33686    pub const DEFAULT: Self = Self {
33687        time_usec: 0_u64,
33688        line_length: 0.0_f32,
33689        speed: 0.0_f32,
33690        tension: 0.0_f32,
33691        voltage: 0.0_f32,
33692        current: 0.0_f32,
33693        status: MavWinchStatusFlag::DEFAULT,
33694        temperature: 0_i16,
33695    };
33696    #[cfg(feature = "arbitrary")]
33697    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33698        use arbitrary::{Arbitrary, Unstructured};
33699        let mut buf = [0u8; 1024];
33700        rng.fill_bytes(&mut buf);
33701        let mut unstructured = Unstructured::new(&buf);
33702        Self::arbitrary(&mut unstructured).unwrap_or_default()
33703    }
33704}
33705impl Default for WINCH_STATUS_DATA {
33706    fn default() -> Self {
33707        Self::DEFAULT.clone()
33708    }
33709}
33710impl MessageData for WINCH_STATUS_DATA {
33711    type Message = MavMessage;
33712    const ID: u32 = 9005u32;
33713    const NAME: &'static str = "WINCH_STATUS";
33714    const EXTRA_CRC: u8 = 117u8;
33715    const ENCODED_LEN: usize = 34usize;
33716    fn deser(
33717        _version: MavlinkVersion,
33718        __input: &[u8],
33719    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33720        let avail_len = __input.len();
33721        let mut payload_buf = [0; Self::ENCODED_LEN];
33722        let mut buf = if avail_len < Self::ENCODED_LEN {
33723            payload_buf[0..avail_len].copy_from_slice(__input);
33724            Bytes::new(&payload_buf)
33725        } else {
33726            Bytes::new(__input)
33727        };
33728        let mut __struct = Self::default();
33729        __struct.time_usec = buf.get_u64_le();
33730        __struct.line_length = buf.get_f32_le();
33731        __struct.speed = buf.get_f32_le();
33732        __struct.tension = buf.get_f32_le();
33733        __struct.voltage = buf.get_f32_le();
33734        __struct.current = buf.get_f32_le();
33735        let tmp = buf.get_u32_le();
33736        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
33737            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33738                flag_type: "MavWinchStatusFlag",
33739                value: tmp as u32,
33740            })?;
33741        __struct.temperature = buf.get_i16_le();
33742        Ok(__struct)
33743    }
33744    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33745        let mut __tmp = BytesMut::new(bytes);
33746        #[allow(clippy::absurd_extreme_comparisons)]
33747        #[allow(unused_comparisons)]
33748        if __tmp.remaining() < Self::ENCODED_LEN {
33749            panic!(
33750                "buffer is too small (need {} bytes, but got {})",
33751                Self::ENCODED_LEN,
33752                __tmp.remaining(),
33753            )
33754        }
33755        __tmp.put_u64_le(self.time_usec);
33756        __tmp.put_f32_le(self.line_length);
33757        __tmp.put_f32_le(self.speed);
33758        __tmp.put_f32_le(self.tension);
33759        __tmp.put_f32_le(self.voltage);
33760        __tmp.put_f32_le(self.current);
33761        __tmp.put_u32_le(self.status.bits());
33762        __tmp.put_i16_le(self.temperature);
33763        if matches!(version, MavlinkVersion::V2) {
33764            let len = __tmp.len();
33765            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33766        } else {
33767            __tmp.len()
33768        }
33769    }
33770}
33771#[doc = "id: 231"]
33772#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33773#[derive(Debug, Clone, PartialEq)]
33774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33776pub struct WIND_COV_DATA {
33777    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33778    pub time_usec: u64,
33779    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
33780    pub wind_x: f32,
33781    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
33782    pub wind_y: f32,
33783    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
33784    pub wind_z: f32,
33785    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
33786    pub var_horiz: f32,
33787    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
33788    pub var_vert: f32,
33789    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
33790    pub wind_alt: f32,
33791    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
33792    pub horiz_accuracy: f32,
33793    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
33794    pub vert_accuracy: f32,
33795}
33796impl WIND_COV_DATA {
33797    pub const ENCODED_LEN: usize = 40usize;
33798    pub const DEFAULT: Self = Self {
33799        time_usec: 0_u64,
33800        wind_x: 0.0_f32,
33801        wind_y: 0.0_f32,
33802        wind_z: 0.0_f32,
33803        var_horiz: 0.0_f32,
33804        var_vert: 0.0_f32,
33805        wind_alt: 0.0_f32,
33806        horiz_accuracy: 0.0_f32,
33807        vert_accuracy: 0.0_f32,
33808    };
33809    #[cfg(feature = "arbitrary")]
33810    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33811        use arbitrary::{Arbitrary, Unstructured};
33812        let mut buf = [0u8; 1024];
33813        rng.fill_bytes(&mut buf);
33814        let mut unstructured = Unstructured::new(&buf);
33815        Self::arbitrary(&mut unstructured).unwrap_or_default()
33816    }
33817}
33818impl Default for WIND_COV_DATA {
33819    fn default() -> Self {
33820        Self::DEFAULT.clone()
33821    }
33822}
33823impl MessageData for WIND_COV_DATA {
33824    type Message = MavMessage;
33825    const ID: u32 = 231u32;
33826    const NAME: &'static str = "WIND_COV";
33827    const EXTRA_CRC: u8 = 105u8;
33828    const ENCODED_LEN: usize = 40usize;
33829    fn deser(
33830        _version: MavlinkVersion,
33831        __input: &[u8],
33832    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33833        let avail_len = __input.len();
33834        let mut payload_buf = [0; Self::ENCODED_LEN];
33835        let mut buf = if avail_len < Self::ENCODED_LEN {
33836            payload_buf[0..avail_len].copy_from_slice(__input);
33837            Bytes::new(&payload_buf)
33838        } else {
33839            Bytes::new(__input)
33840        };
33841        let mut __struct = Self::default();
33842        __struct.time_usec = buf.get_u64_le();
33843        __struct.wind_x = buf.get_f32_le();
33844        __struct.wind_y = buf.get_f32_le();
33845        __struct.wind_z = buf.get_f32_le();
33846        __struct.var_horiz = buf.get_f32_le();
33847        __struct.var_vert = buf.get_f32_le();
33848        __struct.wind_alt = buf.get_f32_le();
33849        __struct.horiz_accuracy = buf.get_f32_le();
33850        __struct.vert_accuracy = buf.get_f32_le();
33851        Ok(__struct)
33852    }
33853    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33854        let mut __tmp = BytesMut::new(bytes);
33855        #[allow(clippy::absurd_extreme_comparisons)]
33856        #[allow(unused_comparisons)]
33857        if __tmp.remaining() < Self::ENCODED_LEN {
33858            panic!(
33859                "buffer is too small (need {} bytes, but got {})",
33860                Self::ENCODED_LEN,
33861                __tmp.remaining(),
33862            )
33863        }
33864        __tmp.put_u64_le(self.time_usec);
33865        __tmp.put_f32_le(self.wind_x);
33866        __tmp.put_f32_le(self.wind_y);
33867        __tmp.put_f32_le(self.wind_z);
33868        __tmp.put_f32_le(self.var_horiz);
33869        __tmp.put_f32_le(self.var_vert);
33870        __tmp.put_f32_le(self.wind_alt);
33871        __tmp.put_f32_le(self.horiz_accuracy);
33872        __tmp.put_f32_le(self.vert_accuracy);
33873        if matches!(version, MavlinkVersion::V2) {
33874            let len = __tmp.len();
33875            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33876        } else {
33877            __tmp.len()
33878        }
33879    }
33880}
33881#[derive(Clone, PartialEq, Debug)]
33882#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33883#[cfg_attr(feature = "serde", serde(tag = "type"))]
33884#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33885#[repr(u32)]
33886pub enum MavMessage {
33887    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
33888    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
33889    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
33890    AIRSPEEDS(AIRSPEEDS_DATA),
33891    AIS_VESSEL(AIS_VESSEL_DATA),
33892    ALTITUDE(ALTITUDE_DATA),
33893    ALTITUDES(ALTITUDES_DATA),
33894    ATTITUDE(ATTITUDE_DATA),
33895    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
33896    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
33897    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
33898    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
33899    AUTH_KEY(AUTH_KEY_DATA),
33900    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
33901    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
33902    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
33903    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
33904    BATTERY_INFO(BATTERY_INFO_DATA),
33905    BATTERY_STATUS(BATTERY_STATUS_DATA),
33906    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
33907    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
33908    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
33909    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
33910    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
33911    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
33912    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
33913    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
33914    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
33915    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
33916    CANFD_FRAME(CANFD_FRAME_DATA),
33917    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
33918    CAN_FRAME(CAN_FRAME_DATA),
33919    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
33920    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
33921    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
33922    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
33923    COLLISION(COLLISION_DATA),
33924    COMMAND_ACK(COMMAND_ACK_DATA),
33925    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
33926    COMMAND_INT(COMMAND_INT_DATA),
33927    COMMAND_LONG(COMMAND_LONG_DATA),
33928    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
33929    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
33930    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
33931    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
33932    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
33933    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
33934    CURRENT_MODE(CURRENT_MODE_DATA),
33935    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
33936    DATA_STREAM(DATA_STREAM_DATA),
33937    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
33938    DEBUG(DEBUG_DATA),
33939    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
33940    DEBUG_VECT(DEBUG_VECT_DATA),
33941    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
33942    EFI_STATUS(EFI_STATUS_DATA),
33943    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
33944    ESC_INFO(ESC_INFO_DATA),
33945    ESC_STATUS(ESC_STATUS_DATA),
33946    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
33947    EVENT(EVENT_DATA),
33948    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
33949    FENCE_STATUS(FENCE_STATUS_DATA),
33950    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
33951    FLEXIFUNCTION_BUFFER_FUNCTION(FLEXIFUNCTION_BUFFER_FUNCTION_DATA),
33952    FLEXIFUNCTION_BUFFER_FUNCTION_ACK(FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA),
33953    FLEXIFUNCTION_COMMAND(FLEXIFUNCTION_COMMAND_DATA),
33954    FLEXIFUNCTION_COMMAND_ACK(FLEXIFUNCTION_COMMAND_ACK_DATA),
33955    FLEXIFUNCTION_DIRECTORY(FLEXIFUNCTION_DIRECTORY_DATA),
33956    FLEXIFUNCTION_DIRECTORY_ACK(FLEXIFUNCTION_DIRECTORY_ACK_DATA),
33957    FLEXIFUNCTION_READ_REQ(FLEXIFUNCTION_READ_REQ_DATA),
33958    FLEXIFUNCTION_SET(FLEXIFUNCTION_SET_DATA),
33959    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
33960    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
33961    FUEL_STATUS(FUEL_STATUS_DATA),
33962    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
33963    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
33964    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
33965    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
33966    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
33967    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
33968    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
33969    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
33970    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
33971    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
33972    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
33973    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
33974    GPS2_RAW(GPS2_RAW_DATA),
33975    GPS2_RTK(GPS2_RTK_DATA),
33976    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
33977    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
33978    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
33979    GPS_INPUT(GPS_INPUT_DATA),
33980    GPS_RAW_INT(GPS_RAW_INT_DATA),
33981    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
33982    GPS_RTK(GPS_RTK_DATA),
33983    GPS_STATUS(GPS_STATUS_DATA),
33984    HEARTBEAT(HEARTBEAT_DATA),
33985    HIGHRES_IMU(HIGHRES_IMU_DATA),
33986    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
33987    HIGH_LATENCY(HIGH_LATENCY_DATA),
33988    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
33989    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
33990    HIL_CONTROLS(HIL_CONTROLS_DATA),
33991    HIL_GPS(HIL_GPS_DATA),
33992    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
33993    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
33994    HIL_SENSOR(HIL_SENSOR_DATA),
33995    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
33996    HIL_STATE(HIL_STATE_DATA),
33997    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
33998    HOME_POSITION(HOME_POSITION_DATA),
33999    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
34000    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
34001    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
34002    LANDING_TARGET(LANDING_TARGET_DATA),
34003    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
34004    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
34005    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
34006    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
34007    LOGGING_ACK(LOGGING_ACK_DATA),
34008    LOGGING_DATA(LOGGING_DATA_DATA),
34009    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
34010    LOG_DATA(LOG_DATA_DATA),
34011    LOG_ENTRY(LOG_ENTRY_DATA),
34012    LOG_ERASE(LOG_ERASE_DATA),
34013    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
34014    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
34015    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
34016    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
34017    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
34018    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
34019    MEMORY_VECT(MEMORY_VECT_DATA),
34020    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
34021    MISSION_ACK(MISSION_ACK_DATA),
34022    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
34023    MISSION_COUNT(MISSION_COUNT_DATA),
34024    MISSION_CURRENT(MISSION_CURRENT_DATA),
34025    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
34026    MISSION_ITEM(MISSION_ITEM_DATA),
34027    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
34028    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
34029    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
34030    MISSION_REQUEST(MISSION_REQUEST_DATA),
34031    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
34032    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
34033    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
34034    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
34035    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
34036    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
34037    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
34038    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
34039    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
34040    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
34041    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
34042    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
34043    ODOMETRY(ODOMETRY_DATA),
34044    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
34045    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
34046    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
34047    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
34048    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
34049    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
34050    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
34051    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
34052    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
34053    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
34054    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
34055    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
34056    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
34057    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
34058    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
34059    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
34060    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
34061    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
34062    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
34063    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
34064    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
34065    PARAM_SET(PARAM_SET_DATA),
34066    PARAM_VALUE(PARAM_VALUE_DATA),
34067    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
34068    PING(PING_DATA),
34069    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
34070    PLAY_TUNE(PLAY_TUNE_DATA),
34071    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
34072    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
34073    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
34074    POWER_STATUS(POWER_STATUS_DATA),
34075    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
34076    RADIO_STATUS(RADIO_STATUS_DATA),
34077    RAW_IMU(RAW_IMU_DATA),
34078    RAW_PRESSURE(RAW_PRESSURE_DATA),
34079    RAW_RPM(RAW_RPM_DATA),
34080    RC_CHANNELS(RC_CHANNELS_DATA),
34081    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
34082    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
34083    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
34084    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
34085    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
34086    REQUEST_EVENT(REQUEST_EVENT_DATA),
34087    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
34088    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
34089    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
34090    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
34091    SCALED_IMU(SCALED_IMU_DATA),
34092    SCALED_IMU2(SCALED_IMU2_DATA),
34093    SCALED_IMU3(SCALED_IMU3_DATA),
34094    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
34095    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
34096    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
34097    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
34098    SERIAL_UDB_EXTRA_F13(SERIAL_UDB_EXTRA_F13_DATA),
34099    SERIAL_UDB_EXTRA_F14(SERIAL_UDB_EXTRA_F14_DATA),
34100    SERIAL_UDB_EXTRA_F15(SERIAL_UDB_EXTRA_F15_DATA),
34101    SERIAL_UDB_EXTRA_F16(SERIAL_UDB_EXTRA_F16_DATA),
34102    SERIAL_UDB_EXTRA_F17(SERIAL_UDB_EXTRA_F17_DATA),
34103    SERIAL_UDB_EXTRA_F18(SERIAL_UDB_EXTRA_F18_DATA),
34104    SERIAL_UDB_EXTRA_F19(SERIAL_UDB_EXTRA_F19_DATA),
34105    SERIAL_UDB_EXTRA_F20(SERIAL_UDB_EXTRA_F20_DATA),
34106    SERIAL_UDB_EXTRA_F21(SERIAL_UDB_EXTRA_F21_DATA),
34107    SERIAL_UDB_EXTRA_F22(SERIAL_UDB_EXTRA_F22_DATA),
34108    SERIAL_UDB_EXTRA_F2_A(SERIAL_UDB_EXTRA_F2_A_DATA),
34109    SERIAL_UDB_EXTRA_F2_B(SERIAL_UDB_EXTRA_F2_B_DATA),
34110    SERIAL_UDB_EXTRA_F4(SERIAL_UDB_EXTRA_F4_DATA),
34111    SERIAL_UDB_EXTRA_F5(SERIAL_UDB_EXTRA_F5_DATA),
34112    SERIAL_UDB_EXTRA_F6(SERIAL_UDB_EXTRA_F6_DATA),
34113    SERIAL_UDB_EXTRA_F7(SERIAL_UDB_EXTRA_F7_DATA),
34114    SERIAL_UDB_EXTRA_F8(SERIAL_UDB_EXTRA_F8_DATA),
34115    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
34116    SETUP_SIGNING(SETUP_SIGNING_DATA),
34117    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
34118    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
34119    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
34120    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
34121    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
34122    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
34123    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
34124    SET_MODE(SET_MODE_DATA),
34125    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
34126    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
34127    SIM_STATE(SIM_STATE_DATA),
34128    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
34129    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
34130    STATUSTEXT(STATUSTEXT_DATA),
34131    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
34132    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
34133    SYSTEM_TIME(SYSTEM_TIME_DATA),
34134    SYS_STATUS(SYS_STATUS_DATA),
34135    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
34136    TERRAIN_DATA(TERRAIN_DATA_DATA),
34137    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
34138    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
34139    TIMESYNC(TIMESYNC_DATA),
34140    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
34141    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
34142    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
34143    TUNNEL(TUNNEL_DATA),
34144    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
34145    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
34146    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
34147    V2_EXTENSION(V2_EXTENSION_DATA),
34148    VFR_HUD(VFR_HUD_DATA),
34149    VIBRATION(VIBRATION_DATA),
34150    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
34151    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
34152    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
34153    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
34154    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
34155    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
34156    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
34157    WINCH_STATUS(WINCH_STATUS_DATA),
34158    WIND_COV(WIND_COV_DATA),
34159}
34160impl MavMessage {
34161    pub const fn all_ids() -> &'static [u32] {
34162        &[
34163            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
34164            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
34165            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
34166            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
34167            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
34168            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
34169            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
34170            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
34171            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
34172            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
34173            148u32, 149u32, 150u32, 151u32, 152u32, 153u32, 155u32, 156u32, 157u32, 158u32, 162u32,
34174            170u32, 171u32, 172u32, 173u32, 174u32, 175u32, 176u32, 177u32, 178u32, 179u32, 180u32,
34175            181u32, 182u32, 183u32, 184u32, 185u32, 186u32, 187u32, 188u32, 192u32, 225u32, 230u32,
34176            231u32, 232u32, 233u32, 234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32,
34177            247u32, 248u32, 249u32, 250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32,
34178            259u32, 260u32, 261u32, 262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32,
34179            270u32, 271u32, 275u32, 276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32,
34180            286u32, 287u32, 288u32, 290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32,
34181            321u32, 322u32, 323u32, 324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32,
34182            339u32, 340u32, 350u32, 360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32,
34183            386u32, 387u32, 388u32, 390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32,
34184            412u32, 413u32, 435u32, 436u32, 437u32, 440u32, 9000u32, 9005u32, 12900u32, 12901u32,
34185            12902u32, 12903u32, 12904u32, 12905u32, 12915u32, 12918u32, 12919u32, 12920u32,
34186        ]
34187    }
34188}
34189impl Message for MavMessage {
34190    fn parse(
34191        version: MavlinkVersion,
34192        id: u32,
34193        payload: &[u8],
34194    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34195        match id {
34196            ACTUATOR_CONTROL_TARGET_DATA::ID => {
34197                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34198                    .map(Self::ACTUATOR_CONTROL_TARGET)
34199            }
34200            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
34201                .map(Self::ACTUATOR_OUTPUT_STATUS),
34202            ADSB_VEHICLE_DATA::ID => {
34203                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
34204            }
34205            AIRSPEEDS_DATA::ID => AIRSPEEDS_DATA::deser(version, payload).map(Self::AIRSPEEDS),
34206            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
34207            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
34208            ALTITUDES_DATA::ID => ALTITUDES_DATA::deser(version, payload).map(Self::ALTITUDES),
34209            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
34210            ATTITUDE_QUATERNION_DATA::ID => {
34211                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
34212            }
34213            ATTITUDE_QUATERNION_COV_DATA::ID => {
34214                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
34215                    .map(Self::ATTITUDE_QUATERNION_COV)
34216            }
34217            ATTITUDE_TARGET_DATA::ID => {
34218                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
34219            }
34220            ATT_POS_MOCAP_DATA::ID => {
34221                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
34222            }
34223            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
34224            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34225                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
34226                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
34227            }
34228            AUTOPILOT_VERSION_DATA::ID => {
34229                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
34230            }
34231            AVAILABLE_MODES_DATA::ID => {
34232                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
34233            }
34234            AVAILABLE_MODES_MONITOR_DATA::ID => {
34235                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
34236                    .map(Self::AVAILABLE_MODES_MONITOR)
34237            }
34238            BATTERY_INFO_DATA::ID => {
34239                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
34240            }
34241            BATTERY_STATUS_DATA::ID => {
34242                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
34243            }
34244            BUTTON_CHANGE_DATA::ID => {
34245                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
34246            }
34247            CAMERA_CAPTURE_STATUS_DATA::ID => {
34248                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
34249            }
34250            CAMERA_FOV_STATUS_DATA::ID => {
34251                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
34252            }
34253            CAMERA_IMAGE_CAPTURED_DATA::ID => {
34254                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
34255            }
34256            CAMERA_INFORMATION_DATA::ID => {
34257                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
34258            }
34259            CAMERA_SETTINGS_DATA::ID => {
34260                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
34261            }
34262            CAMERA_THERMAL_RANGE_DATA::ID => {
34263                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
34264            }
34265            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
34266                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
34267                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
34268            }
34269            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
34270                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
34271                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
34272            }
34273            CAMERA_TRIGGER_DATA::ID => {
34274                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
34275            }
34276            CANFD_FRAME_DATA::ID => {
34277                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
34278            }
34279            CAN_FILTER_MODIFY_DATA::ID => {
34280                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
34281            }
34282            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
34283            CELLULAR_CONFIG_DATA::ID => {
34284                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
34285            }
34286            CELLULAR_STATUS_DATA::ID => {
34287                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
34288            }
34289            CHANGE_OPERATOR_CONTROL_DATA::ID => {
34290                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
34291                    .map(Self::CHANGE_OPERATOR_CONTROL)
34292            }
34293            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
34294                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
34295                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
34296            }
34297            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
34298            COMMAND_ACK_DATA::ID => {
34299                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
34300            }
34301            COMMAND_CANCEL_DATA::ID => {
34302                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
34303            }
34304            COMMAND_INT_DATA::ID => {
34305                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
34306            }
34307            COMMAND_LONG_DATA::ID => {
34308                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
34309            }
34310            COMPONENT_INFORMATION_DATA::ID => {
34311                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
34312            }
34313            COMPONENT_INFORMATION_BASIC_DATA::ID => {
34314                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
34315                    .map(Self::COMPONENT_INFORMATION_BASIC)
34316            }
34317            COMPONENT_METADATA_DATA::ID => {
34318                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
34319            }
34320            CONTROL_SYSTEM_STATE_DATA::ID => {
34321                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
34322            }
34323            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
34324                .map(Self::CURRENT_EVENT_SEQUENCE),
34325            CURRENT_MODE_DATA::ID => {
34326                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
34327            }
34328            DATA_STREAM_DATA::ID => {
34329                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
34330            }
34331            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
34332                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
34333                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
34334            }
34335            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
34336            DEBUG_FLOAT_ARRAY_DATA::ID => {
34337                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
34338            }
34339            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
34340            DISTANCE_SENSOR_DATA::ID => {
34341                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
34342            }
34343            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
34344            ENCAPSULATED_DATA_DATA::ID => {
34345                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
34346            }
34347            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
34348            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
34349            ESTIMATOR_STATUS_DATA::ID => {
34350                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
34351            }
34352            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
34353            EXTENDED_SYS_STATE_DATA::ID => {
34354                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
34355            }
34356            FENCE_STATUS_DATA::ID => {
34357                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
34358            }
34359            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
34360                .map(Self::FILE_TRANSFER_PROTOCOL),
34361            FLEXIFUNCTION_BUFFER_FUNCTION_DATA::ID => {
34362                FLEXIFUNCTION_BUFFER_FUNCTION_DATA::deser(version, payload)
34363                    .map(Self::FLEXIFUNCTION_BUFFER_FUNCTION)
34364            }
34365            FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::ID => {
34366                FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::deser(version, payload)
34367                    .map(Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK)
34368            }
34369            FLEXIFUNCTION_COMMAND_DATA::ID => {
34370                FLEXIFUNCTION_COMMAND_DATA::deser(version, payload).map(Self::FLEXIFUNCTION_COMMAND)
34371            }
34372            FLEXIFUNCTION_COMMAND_ACK_DATA::ID => {
34373                FLEXIFUNCTION_COMMAND_ACK_DATA::deser(version, payload)
34374                    .map(Self::FLEXIFUNCTION_COMMAND_ACK)
34375            }
34376            FLEXIFUNCTION_DIRECTORY_DATA::ID => {
34377                FLEXIFUNCTION_DIRECTORY_DATA::deser(version, payload)
34378                    .map(Self::FLEXIFUNCTION_DIRECTORY)
34379            }
34380            FLEXIFUNCTION_DIRECTORY_ACK_DATA::ID => {
34381                FLEXIFUNCTION_DIRECTORY_ACK_DATA::deser(version, payload)
34382                    .map(Self::FLEXIFUNCTION_DIRECTORY_ACK)
34383            }
34384            FLEXIFUNCTION_READ_REQ_DATA::ID => FLEXIFUNCTION_READ_REQ_DATA::deser(version, payload)
34385                .map(Self::FLEXIFUNCTION_READ_REQ),
34386            FLEXIFUNCTION_SET_DATA::ID => {
34387                FLEXIFUNCTION_SET_DATA::deser(version, payload).map(Self::FLEXIFUNCTION_SET)
34388            }
34389            FLIGHT_INFORMATION_DATA::ID => {
34390                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
34391            }
34392            FOLLOW_TARGET_DATA::ID => {
34393                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
34394            }
34395            FUEL_STATUS_DATA::ID => {
34396                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
34397            }
34398            GENERATOR_STATUS_DATA::ID => {
34399                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
34400            }
34401            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
34402                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
34403                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
34404            }
34405            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
34406                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
34407                    .map(Self::GIMBAL_DEVICE_INFORMATION)
34408            }
34409            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
34410                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
34411                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
34412            }
34413            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
34414                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
34415                    .map(Self::GIMBAL_MANAGER_INFORMATION)
34416            }
34417            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
34418                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
34419                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
34420            }
34421            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34422                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
34423                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
34424            }
34425            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
34426                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
34427                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
34428            }
34429            GIMBAL_MANAGER_STATUS_DATA::ID => {
34430                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
34431            }
34432            GLOBAL_POSITION_INT_DATA::ID => {
34433                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
34434            }
34435            GLOBAL_POSITION_INT_COV_DATA::ID => {
34436                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
34437                    .map(Self::GLOBAL_POSITION_INT_COV)
34438            }
34439            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34440                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34441                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
34442            }
34443            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
34444            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
34445            GPS_GLOBAL_ORIGIN_DATA::ID => {
34446                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
34447            }
34448            GPS_INJECT_DATA_DATA::ID => {
34449                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
34450            }
34451            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
34452            GPS_RAW_INT_DATA::ID => {
34453                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
34454            }
34455            GPS_RTCM_DATA_DATA::ID => {
34456                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
34457            }
34458            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
34459            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
34460            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
34461            HIGHRES_IMU_DATA::ID => {
34462                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
34463            }
34464            HIGH_LATENCY_DATA::ID => {
34465                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
34466            }
34467            HIGH_LATENCY2_DATA::ID => {
34468                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
34469            }
34470            HIL_ACTUATOR_CONTROLS_DATA::ID => {
34471                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
34472            }
34473            HIL_CONTROLS_DATA::ID => {
34474                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
34475            }
34476            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
34477            HIL_OPTICAL_FLOW_DATA::ID => {
34478                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
34479            }
34480            HIL_RC_INPUTS_RAW_DATA::ID => {
34481                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
34482            }
34483            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
34484            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
34485            HIL_STATE_QUATERNION_DATA::ID => {
34486                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
34487            }
34488            HOME_POSITION_DATA::ID => {
34489                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
34490            }
34491            HYGROMETER_SENSOR_DATA::ID => {
34492                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
34493            }
34494            ILLUMINATOR_STATUS_DATA::ID => {
34495                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
34496            }
34497            ISBD_LINK_STATUS_DATA::ID => {
34498                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
34499            }
34500            LANDING_TARGET_DATA::ID => {
34501                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
34502            }
34503            LINK_NODE_STATUS_DATA::ID => {
34504                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
34505            }
34506            LOCAL_POSITION_NED_DATA::ID => {
34507                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
34508            }
34509            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
34510                .map(Self::LOCAL_POSITION_NED_COV),
34511            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34512                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
34513                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
34514            }
34515            LOGGING_ACK_DATA::ID => {
34516                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
34517            }
34518            LOGGING_DATA_DATA::ID => {
34519                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
34520            }
34521            LOGGING_DATA_ACKED_DATA::ID => {
34522                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
34523            }
34524            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
34525            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
34526            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
34527            LOG_REQUEST_DATA_DATA::ID => {
34528                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
34529            }
34530            LOG_REQUEST_END_DATA::ID => {
34531                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
34532            }
34533            LOG_REQUEST_LIST_DATA::ID => {
34534                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
34535            }
34536            MAG_CAL_REPORT_DATA::ID => {
34537                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
34538            }
34539            MANUAL_CONTROL_DATA::ID => {
34540                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
34541            }
34542            MANUAL_SETPOINT_DATA::ID => {
34543                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
34544            }
34545            MEMORY_VECT_DATA::ID => {
34546                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
34547            }
34548            MESSAGE_INTERVAL_DATA::ID => {
34549                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
34550            }
34551            MISSION_ACK_DATA::ID => {
34552                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
34553            }
34554            MISSION_CLEAR_ALL_DATA::ID => {
34555                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
34556            }
34557            MISSION_COUNT_DATA::ID => {
34558                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
34559            }
34560            MISSION_CURRENT_DATA::ID => {
34561                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
34562            }
34563            MISSION_ITEM_DATA::ID => {
34564                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
34565            }
34566            MISSION_ITEM_INT_DATA::ID => {
34567                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
34568            }
34569            MISSION_ITEM_REACHED_DATA::ID => {
34570                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
34571            }
34572            MISSION_REQUEST_DATA::ID => {
34573                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
34574            }
34575            MISSION_REQUEST_INT_DATA::ID => {
34576                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
34577            }
34578            MISSION_REQUEST_LIST_DATA::ID => {
34579                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
34580            }
34581            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
34582                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
34583                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
34584            }
34585            MISSION_SET_CURRENT_DATA::ID => {
34586                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
34587            }
34588            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
34589                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
34590                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
34591            }
34592            MOUNT_ORIENTATION_DATA::ID => {
34593                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
34594            }
34595            NAMED_VALUE_FLOAT_DATA::ID => {
34596                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
34597            }
34598            NAMED_VALUE_INT_DATA::ID => {
34599                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
34600            }
34601            NAV_CONTROLLER_OUTPUT_DATA::ID => {
34602                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
34603            }
34604            OBSTACLE_DISTANCE_DATA::ID => {
34605                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
34606            }
34607            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
34608            ONBOARD_COMPUTER_STATUS_DATA::ID => {
34609                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
34610                    .map(Self::ONBOARD_COMPUTER_STATUS)
34611            }
34612            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
34613                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
34614                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
34615            }
34616            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
34617                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
34618                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
34619            }
34620            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
34621                .map(Self::OPEN_DRONE_ID_BASIC_ID),
34622            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
34623                .map(Self::OPEN_DRONE_ID_LOCATION),
34624            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
34625                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
34626                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
34627            }
34628            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
34629                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
34630                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
34631            }
34632            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
34633                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
34634            }
34635            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
34636                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
34637            }
34638            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
34639                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
34640                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
34641            }
34642            OPTICAL_FLOW_DATA::ID => {
34643                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
34644            }
34645            OPTICAL_FLOW_RAD_DATA::ID => {
34646                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
34647            }
34648            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
34649                .map(Self::ORBIT_EXECUTION_STATUS),
34650            PARAM_EXT_ACK_DATA::ID => {
34651                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
34652            }
34653            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
34654                .map(Self::PARAM_EXT_REQUEST_LIST),
34655            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
34656                .map(Self::PARAM_EXT_REQUEST_READ),
34657            PARAM_EXT_SET_DATA::ID => {
34658                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
34659            }
34660            PARAM_EXT_VALUE_DATA::ID => {
34661                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
34662            }
34663            PARAM_MAP_RC_DATA::ID => {
34664                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
34665            }
34666            PARAM_REQUEST_LIST_DATA::ID => {
34667                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
34668            }
34669            PARAM_REQUEST_READ_DATA::ID => {
34670                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
34671            }
34672            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
34673            PARAM_VALUE_DATA::ID => {
34674                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
34675            }
34676            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
34677            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
34678            PLAY_TUNE_V2_DATA::ID => {
34679                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
34680            }
34681            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34682                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34683                    .map(Self::POSITION_TARGET_GLOBAL_INT)
34684            }
34685            POSITION_TARGET_LOCAL_NED_DATA::ID => {
34686                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34687                    .map(Self::POSITION_TARGET_LOCAL_NED)
34688            }
34689            POWER_STATUS_DATA::ID => {
34690                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
34691            }
34692            PROTOCOL_VERSION_DATA::ID => {
34693                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
34694            }
34695            RADIO_STATUS_DATA::ID => {
34696                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
34697            }
34698            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
34699            RAW_PRESSURE_DATA::ID => {
34700                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
34701            }
34702            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
34703            RC_CHANNELS_DATA::ID => {
34704                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
34705            }
34706            RC_CHANNELS_OVERRIDE_DATA::ID => {
34707                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
34708            }
34709            RC_CHANNELS_RAW_DATA::ID => {
34710                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
34711            }
34712            RC_CHANNELS_SCALED_DATA::ID => {
34713                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
34714            }
34715            REQUEST_DATA_STREAM_DATA::ID => {
34716                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
34717            }
34718            REQUEST_EVENT_DATA::ID => {
34719                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
34720            }
34721            RESOURCE_REQUEST_DATA::ID => {
34722                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
34723            }
34724            RESPONSE_EVENT_ERROR_DATA::ID => {
34725                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
34726            }
34727            SAFETY_ALLOWED_AREA_DATA::ID => {
34728                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
34729            }
34730            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
34731                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
34732                    .map(Self::SAFETY_SET_ALLOWED_AREA)
34733            }
34734            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
34735            SCALED_IMU2_DATA::ID => {
34736                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
34737            }
34738            SCALED_IMU3_DATA::ID => {
34739                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
34740            }
34741            SCALED_PRESSURE_DATA::ID => {
34742                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
34743            }
34744            SCALED_PRESSURE2_DATA::ID => {
34745                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
34746            }
34747            SCALED_PRESSURE3_DATA::ID => {
34748                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
34749            }
34750            SERIAL_CONTROL_DATA::ID => {
34751                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
34752            }
34753            SERIAL_UDB_EXTRA_F13_DATA::ID => {
34754                SERIAL_UDB_EXTRA_F13_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F13)
34755            }
34756            SERIAL_UDB_EXTRA_F14_DATA::ID => {
34757                SERIAL_UDB_EXTRA_F14_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F14)
34758            }
34759            SERIAL_UDB_EXTRA_F15_DATA::ID => {
34760                SERIAL_UDB_EXTRA_F15_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F15)
34761            }
34762            SERIAL_UDB_EXTRA_F16_DATA::ID => {
34763                SERIAL_UDB_EXTRA_F16_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F16)
34764            }
34765            SERIAL_UDB_EXTRA_F17_DATA::ID => {
34766                SERIAL_UDB_EXTRA_F17_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F17)
34767            }
34768            SERIAL_UDB_EXTRA_F18_DATA::ID => {
34769                SERIAL_UDB_EXTRA_F18_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F18)
34770            }
34771            SERIAL_UDB_EXTRA_F19_DATA::ID => {
34772                SERIAL_UDB_EXTRA_F19_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F19)
34773            }
34774            SERIAL_UDB_EXTRA_F20_DATA::ID => {
34775                SERIAL_UDB_EXTRA_F20_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F20)
34776            }
34777            SERIAL_UDB_EXTRA_F21_DATA::ID => {
34778                SERIAL_UDB_EXTRA_F21_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F21)
34779            }
34780            SERIAL_UDB_EXTRA_F22_DATA::ID => {
34781                SERIAL_UDB_EXTRA_F22_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F22)
34782            }
34783            SERIAL_UDB_EXTRA_F2_A_DATA::ID => {
34784                SERIAL_UDB_EXTRA_F2_A_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F2_A)
34785            }
34786            SERIAL_UDB_EXTRA_F2_B_DATA::ID => {
34787                SERIAL_UDB_EXTRA_F2_B_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F2_B)
34788            }
34789            SERIAL_UDB_EXTRA_F4_DATA::ID => {
34790                SERIAL_UDB_EXTRA_F4_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F4)
34791            }
34792            SERIAL_UDB_EXTRA_F5_DATA::ID => {
34793                SERIAL_UDB_EXTRA_F5_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F5)
34794            }
34795            SERIAL_UDB_EXTRA_F6_DATA::ID => {
34796                SERIAL_UDB_EXTRA_F6_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F6)
34797            }
34798            SERIAL_UDB_EXTRA_F7_DATA::ID => {
34799                SERIAL_UDB_EXTRA_F7_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F7)
34800            }
34801            SERIAL_UDB_EXTRA_F8_DATA::ID => {
34802                SERIAL_UDB_EXTRA_F8_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F8)
34803            }
34804            SERVO_OUTPUT_RAW_DATA::ID => {
34805                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
34806            }
34807            SETUP_SIGNING_DATA::ID => {
34808                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
34809            }
34810            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
34811                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34812                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
34813            }
34814            SET_ATTITUDE_TARGET_DATA::ID => {
34815                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
34816            }
34817            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
34818                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
34819            }
34820            SET_HOME_POSITION_DATA::ID => {
34821                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
34822            }
34823            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
34824            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34825                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34826                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
34827            }
34828            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
34829                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34830                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
34831            }
34832            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
34833            SMART_BATTERY_INFO_DATA::ID => {
34834                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
34835            }
34836            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
34837            STORAGE_INFORMATION_DATA::ID => {
34838                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
34839            }
34840            SUPPORTED_TUNES_DATA::ID => {
34841                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
34842            }
34843            SYSTEM_TIME_DATA::ID => {
34844                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
34845            }
34846            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
34847            TERRAIN_CHECK_DATA::ID => {
34848                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
34849            }
34850            TERRAIN_DATA_DATA::ID => {
34851                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
34852            }
34853            TERRAIN_REPORT_DATA::ID => {
34854                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
34855            }
34856            TERRAIN_REQUEST_DATA::ID => {
34857                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
34858            }
34859            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
34860            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
34861                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
34862                    .map(Self::TIME_ESTIMATE_TO_TARGET)
34863            }
34864            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34865                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
34866                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
34867            }
34868            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34869                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
34870                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
34871            }
34872            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
34873            UAVCAN_NODE_INFO_DATA::ID => {
34874                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
34875            }
34876            UAVCAN_NODE_STATUS_DATA::ID => {
34877                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
34878            }
34879            UTM_GLOBAL_POSITION_DATA::ID => {
34880                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
34881            }
34882            V2_EXTENSION_DATA::ID => {
34883                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34884            }
34885            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34886            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34887            VICON_POSITION_ESTIMATE_DATA::ID => {
34888                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
34889                    .map(Self::VICON_POSITION_ESTIMATE)
34890            }
34891            VIDEO_STREAM_INFORMATION_DATA::ID => {
34892                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34893                    .map(Self::VIDEO_STREAM_INFORMATION)
34894            }
34895            VIDEO_STREAM_STATUS_DATA::ID => {
34896                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
34897            }
34898            VISION_POSITION_ESTIMATE_DATA::ID => {
34899                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34900                    .map(Self::VISION_POSITION_ESTIMATE)
34901            }
34902            VISION_SPEED_ESTIMATE_DATA::ID => {
34903                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
34904            }
34905            WHEEL_DISTANCE_DATA::ID => {
34906                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
34907            }
34908            WIFI_CONFIG_AP_DATA::ID => {
34909                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
34910            }
34911            WINCH_STATUS_DATA::ID => {
34912                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
34913            }
34914            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
34915            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
34916        }
34917    }
34918    fn message_name(&self) -> &'static str {
34919        match self {
34920            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34921            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34922            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
34923            Self::AIRSPEEDS(..) => AIRSPEEDS_DATA::NAME,
34924            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34925            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34926            Self::ALTITUDES(..) => ALTITUDES_DATA::NAME,
34927            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34928            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34929            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34930            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34931            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34932            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34933            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34934                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34935            }
34936            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34937            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34938            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34939            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34940            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34941            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34942            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34943            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34944            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34945            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34946            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34947            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34948            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34949            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34950            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34951            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34952            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34953            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34954            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34955            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
34956            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34957            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34958            Self::COLLISION(..) => COLLISION_DATA::NAME,
34959            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34960            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34961            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34962            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
34963            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34964            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34965            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34966            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34967            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34968            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34969            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
34970            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34971            Self::DEBUG(..) => DEBUG_DATA::NAME,
34972            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34973            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
34974            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34975            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34976            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34977            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34978            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34979            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34980            Self::EVENT(..) => EVENT_DATA::NAME,
34981            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34982            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34983            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34984            Self::FLEXIFUNCTION_BUFFER_FUNCTION(..) => FLEXIFUNCTION_BUFFER_FUNCTION_DATA::NAME,
34985            Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(..) => {
34986                FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::NAME
34987            }
34988            Self::FLEXIFUNCTION_COMMAND(..) => FLEXIFUNCTION_COMMAND_DATA::NAME,
34989            Self::FLEXIFUNCTION_COMMAND_ACK(..) => FLEXIFUNCTION_COMMAND_ACK_DATA::NAME,
34990            Self::FLEXIFUNCTION_DIRECTORY(..) => FLEXIFUNCTION_DIRECTORY_DATA::NAME,
34991            Self::FLEXIFUNCTION_DIRECTORY_ACK(..) => FLEXIFUNCTION_DIRECTORY_ACK_DATA::NAME,
34992            Self::FLEXIFUNCTION_READ_REQ(..) => FLEXIFUNCTION_READ_REQ_DATA::NAME,
34993            Self::FLEXIFUNCTION_SET(..) => FLEXIFUNCTION_SET_DATA::NAME,
34994            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34995            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34996            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34997            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34998            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34999            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
35000            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
35001            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
35002            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
35003            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
35004                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
35005            }
35006            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
35007            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
35008            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
35009            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
35010            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
35011            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
35012            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
35013            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
35014            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
35015            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
35016            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
35017            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
35018            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
35019            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
35020            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
35021            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
35022            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
35023            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
35024            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
35025            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
35026            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
35027            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
35028            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
35029            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
35030            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
35031            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
35032            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
35033            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
35034            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
35035            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
35036            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
35037            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
35038            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
35039            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
35040            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
35041                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
35042            }
35043            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
35044            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
35045            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
35046            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
35047            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
35048            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
35049            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
35050            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
35051            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
35052            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
35053            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
35054            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
35055            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
35056            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
35057            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
35058            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
35059            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
35060            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
35061            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
35062            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
35063            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
35064            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
35065            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
35066            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
35067            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
35068            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
35069            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
35070            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
35071            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
35072            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
35073            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
35074            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
35075            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
35076            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
35077            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
35078            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
35079            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
35080            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
35081            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
35082            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
35083            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
35084            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
35085            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
35086            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
35087            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
35088            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
35089            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
35090            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
35091            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
35092            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
35093            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
35094            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
35095            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
35096            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
35097            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
35098            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
35099            Self::PING(..) => PING_DATA::NAME,
35100            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
35101            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
35102            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35103            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
35104            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
35105            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
35106            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
35107            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
35108            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
35109            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
35110            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
35111            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
35112            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
35113            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
35114            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
35115            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
35116            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
35117            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
35118            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
35119            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
35120            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
35121            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
35122            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
35123            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
35124            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
35125            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
35126            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
35127            Self::SERIAL_UDB_EXTRA_F13(..) => SERIAL_UDB_EXTRA_F13_DATA::NAME,
35128            Self::SERIAL_UDB_EXTRA_F14(..) => SERIAL_UDB_EXTRA_F14_DATA::NAME,
35129            Self::SERIAL_UDB_EXTRA_F15(..) => SERIAL_UDB_EXTRA_F15_DATA::NAME,
35130            Self::SERIAL_UDB_EXTRA_F16(..) => SERIAL_UDB_EXTRA_F16_DATA::NAME,
35131            Self::SERIAL_UDB_EXTRA_F17(..) => SERIAL_UDB_EXTRA_F17_DATA::NAME,
35132            Self::SERIAL_UDB_EXTRA_F18(..) => SERIAL_UDB_EXTRA_F18_DATA::NAME,
35133            Self::SERIAL_UDB_EXTRA_F19(..) => SERIAL_UDB_EXTRA_F19_DATA::NAME,
35134            Self::SERIAL_UDB_EXTRA_F20(..) => SERIAL_UDB_EXTRA_F20_DATA::NAME,
35135            Self::SERIAL_UDB_EXTRA_F21(..) => SERIAL_UDB_EXTRA_F21_DATA::NAME,
35136            Self::SERIAL_UDB_EXTRA_F22(..) => SERIAL_UDB_EXTRA_F22_DATA::NAME,
35137            Self::SERIAL_UDB_EXTRA_F2_A(..) => SERIAL_UDB_EXTRA_F2_A_DATA::NAME,
35138            Self::SERIAL_UDB_EXTRA_F2_B(..) => SERIAL_UDB_EXTRA_F2_B_DATA::NAME,
35139            Self::SERIAL_UDB_EXTRA_F4(..) => SERIAL_UDB_EXTRA_F4_DATA::NAME,
35140            Self::SERIAL_UDB_EXTRA_F5(..) => SERIAL_UDB_EXTRA_F5_DATA::NAME,
35141            Self::SERIAL_UDB_EXTRA_F6(..) => SERIAL_UDB_EXTRA_F6_DATA::NAME,
35142            Self::SERIAL_UDB_EXTRA_F7(..) => SERIAL_UDB_EXTRA_F7_DATA::NAME,
35143            Self::SERIAL_UDB_EXTRA_F8(..) => SERIAL_UDB_EXTRA_F8_DATA::NAME,
35144            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
35145            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
35146            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
35147            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
35148            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
35149            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
35150            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
35151            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35152            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
35153            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
35154            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
35155            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
35156            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
35157            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
35158            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
35159            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
35160            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
35161            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
35162            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
35163            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
35164            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
35165            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
35166            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
35167                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
35168            }
35169            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35170                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
35171            }
35172            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
35173            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
35174            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
35175            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
35176            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
35177            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
35178            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
35179            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
35180            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
35181            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
35182            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
35183            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
35184            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
35185            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
35186            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
35187            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
35188        }
35189    }
35190    fn message_id(&self) -> u32 {
35191        match self {
35192            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
35193            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
35194            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
35195            Self::AIRSPEEDS(..) => AIRSPEEDS_DATA::ID,
35196            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
35197            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
35198            Self::ALTITUDES(..) => ALTITUDES_DATA::ID,
35199            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
35200            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
35201            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
35202            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
35203            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
35204            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
35205            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
35206                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
35207            }
35208            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
35209            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
35210            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
35211            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
35212            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
35213            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
35214            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
35215            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
35216            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
35217            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
35218            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
35219            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
35220            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
35221            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
35222            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
35223            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
35224            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
35225            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
35226            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
35227            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
35228            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
35229            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
35230            Self::COLLISION(..) => COLLISION_DATA::ID,
35231            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
35232            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
35233            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
35234            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
35235            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
35236            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
35237            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
35238            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
35239            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
35240            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
35241            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
35242            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
35243            Self::DEBUG(..) => DEBUG_DATA::ID,
35244            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
35245            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
35246            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
35247            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
35248            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
35249            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
35250            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
35251            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
35252            Self::EVENT(..) => EVENT_DATA::ID,
35253            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
35254            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
35255            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
35256            Self::FLEXIFUNCTION_BUFFER_FUNCTION(..) => FLEXIFUNCTION_BUFFER_FUNCTION_DATA::ID,
35257            Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(..) => {
35258                FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::ID
35259            }
35260            Self::FLEXIFUNCTION_COMMAND(..) => FLEXIFUNCTION_COMMAND_DATA::ID,
35261            Self::FLEXIFUNCTION_COMMAND_ACK(..) => FLEXIFUNCTION_COMMAND_ACK_DATA::ID,
35262            Self::FLEXIFUNCTION_DIRECTORY(..) => FLEXIFUNCTION_DIRECTORY_DATA::ID,
35263            Self::FLEXIFUNCTION_DIRECTORY_ACK(..) => FLEXIFUNCTION_DIRECTORY_ACK_DATA::ID,
35264            Self::FLEXIFUNCTION_READ_REQ(..) => FLEXIFUNCTION_READ_REQ_DATA::ID,
35265            Self::FLEXIFUNCTION_SET(..) => FLEXIFUNCTION_SET_DATA::ID,
35266            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
35267            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
35268            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
35269            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
35270            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
35271            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
35272            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
35273            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
35274            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
35275            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
35276                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
35277            }
35278            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
35279            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
35280            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
35281            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
35282            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
35283            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
35284            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
35285            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
35286            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
35287            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
35288            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
35289            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
35290            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
35291            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
35292            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
35293            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
35294            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
35295            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
35296            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
35297            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
35298            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
35299            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
35300            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
35301            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
35302            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
35303            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
35304            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
35305            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
35306            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
35307            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
35308            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
35309            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
35310            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
35311            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
35312            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
35313                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
35314            }
35315            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
35316            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
35317            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
35318            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
35319            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
35320            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
35321            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
35322            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
35323            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
35324            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
35325            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
35326            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
35327            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
35328            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
35329            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
35330            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
35331            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
35332            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
35333            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
35334            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
35335            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
35336            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
35337            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
35338            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
35339            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
35340            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
35341            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
35342            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
35343            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
35344            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
35345            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
35346            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
35347            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
35348            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
35349            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
35350            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
35351            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
35352            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
35353            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
35354            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
35355            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
35356            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
35357            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
35358            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
35359            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
35360            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
35361            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
35362            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
35363            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
35364            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
35365            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
35366            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
35367            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
35368            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
35369            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
35370            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
35371            Self::PING(..) => PING_DATA::ID,
35372            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
35373            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
35374            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
35375            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
35376            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
35377            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
35378            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
35379            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
35380            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
35381            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
35382            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
35383            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
35384            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
35385            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
35386            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
35387            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
35388            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
35389            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
35390            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
35391            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
35392            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
35393            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
35394            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
35395            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
35396            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
35397            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
35398            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
35399            Self::SERIAL_UDB_EXTRA_F13(..) => SERIAL_UDB_EXTRA_F13_DATA::ID,
35400            Self::SERIAL_UDB_EXTRA_F14(..) => SERIAL_UDB_EXTRA_F14_DATA::ID,
35401            Self::SERIAL_UDB_EXTRA_F15(..) => SERIAL_UDB_EXTRA_F15_DATA::ID,
35402            Self::SERIAL_UDB_EXTRA_F16(..) => SERIAL_UDB_EXTRA_F16_DATA::ID,
35403            Self::SERIAL_UDB_EXTRA_F17(..) => SERIAL_UDB_EXTRA_F17_DATA::ID,
35404            Self::SERIAL_UDB_EXTRA_F18(..) => SERIAL_UDB_EXTRA_F18_DATA::ID,
35405            Self::SERIAL_UDB_EXTRA_F19(..) => SERIAL_UDB_EXTRA_F19_DATA::ID,
35406            Self::SERIAL_UDB_EXTRA_F20(..) => SERIAL_UDB_EXTRA_F20_DATA::ID,
35407            Self::SERIAL_UDB_EXTRA_F21(..) => SERIAL_UDB_EXTRA_F21_DATA::ID,
35408            Self::SERIAL_UDB_EXTRA_F22(..) => SERIAL_UDB_EXTRA_F22_DATA::ID,
35409            Self::SERIAL_UDB_EXTRA_F2_A(..) => SERIAL_UDB_EXTRA_F2_A_DATA::ID,
35410            Self::SERIAL_UDB_EXTRA_F2_B(..) => SERIAL_UDB_EXTRA_F2_B_DATA::ID,
35411            Self::SERIAL_UDB_EXTRA_F4(..) => SERIAL_UDB_EXTRA_F4_DATA::ID,
35412            Self::SERIAL_UDB_EXTRA_F5(..) => SERIAL_UDB_EXTRA_F5_DATA::ID,
35413            Self::SERIAL_UDB_EXTRA_F6(..) => SERIAL_UDB_EXTRA_F6_DATA::ID,
35414            Self::SERIAL_UDB_EXTRA_F7(..) => SERIAL_UDB_EXTRA_F7_DATA::ID,
35415            Self::SERIAL_UDB_EXTRA_F8(..) => SERIAL_UDB_EXTRA_F8_DATA::ID,
35416            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
35417            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
35418            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
35419            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
35420            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
35421            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
35422            Self::SET_MODE(..) => SET_MODE_DATA::ID,
35423            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
35424            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
35425            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
35426            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
35427            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
35428            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
35429            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
35430            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
35431            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
35432            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
35433            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
35434            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
35435            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
35436            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
35437            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
35438            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
35439            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35440                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
35441            }
35442            Self::TUNNEL(..) => TUNNEL_DATA::ID,
35443            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
35444            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
35445            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
35446            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
35447            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
35448            Self::VIBRATION(..) => VIBRATION_DATA::ID,
35449            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
35450            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
35451            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
35452            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
35453            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
35454            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
35455            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
35456            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
35457            Self::WIND_COV(..) => WIND_COV_DATA::ID,
35458        }
35459    }
35460    fn message_id_from_name(name: &str) -> Option<u32> {
35461        match name {
35462            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
35463            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
35464            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
35465            AIRSPEEDS_DATA::NAME => Some(AIRSPEEDS_DATA::ID),
35466            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
35467            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
35468            ALTITUDES_DATA::NAME => Some(ALTITUDES_DATA::ID),
35469            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
35470            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
35471            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
35472            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
35473            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
35474            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
35475            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
35476                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
35477            }
35478            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
35479            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
35480            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
35481            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
35482            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
35483            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
35484            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
35485            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
35486            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
35487            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
35488            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
35489            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
35490            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
35491            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
35492            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
35493            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
35494            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
35495            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
35496            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
35497            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
35498            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
35499            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
35500            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
35501            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
35502            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
35503            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
35504            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
35505            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
35506            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
35507            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
35508            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
35509            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
35510            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
35511            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
35512            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
35513            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
35514            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
35515            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
35516            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
35517            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
35518            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
35519            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
35520            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
35521            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
35522            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
35523            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
35524            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
35525            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
35526            FLEXIFUNCTION_BUFFER_FUNCTION_DATA::NAME => {
35527                Some(FLEXIFUNCTION_BUFFER_FUNCTION_DATA::ID)
35528            }
35529            FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::NAME => {
35530                Some(FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::ID)
35531            }
35532            FLEXIFUNCTION_COMMAND_DATA::NAME => Some(FLEXIFUNCTION_COMMAND_DATA::ID),
35533            FLEXIFUNCTION_COMMAND_ACK_DATA::NAME => Some(FLEXIFUNCTION_COMMAND_ACK_DATA::ID),
35534            FLEXIFUNCTION_DIRECTORY_DATA::NAME => Some(FLEXIFUNCTION_DIRECTORY_DATA::ID),
35535            FLEXIFUNCTION_DIRECTORY_ACK_DATA::NAME => Some(FLEXIFUNCTION_DIRECTORY_ACK_DATA::ID),
35536            FLEXIFUNCTION_READ_REQ_DATA::NAME => Some(FLEXIFUNCTION_READ_REQ_DATA::ID),
35537            FLEXIFUNCTION_SET_DATA::NAME => Some(FLEXIFUNCTION_SET_DATA::ID),
35538            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
35539            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
35540            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
35541            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
35542            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
35543                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
35544            }
35545            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
35546            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
35547            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
35548            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
35549            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
35550                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
35551            }
35552            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
35553            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
35554            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
35555            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
35556            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
35557                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
35558            }
35559            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
35560            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
35561            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
35562            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
35563            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
35564            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
35565            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
35566            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
35567            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
35568            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
35569            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
35570            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
35571            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
35572            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
35573            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
35574            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
35575            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
35576            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
35577            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
35578            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
35579            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
35580            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
35581            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
35582            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
35583            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
35584            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
35585            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
35586            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
35587            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
35588            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
35589                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
35590            }
35591            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
35592            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
35593            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
35594            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
35595            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
35596            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
35597            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
35598            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
35599            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
35600            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
35601            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
35602            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
35603            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
35604            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
35605            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
35606            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
35607            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
35608            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
35609            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
35610            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
35611            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
35612            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
35613            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
35614            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
35615            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
35616            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
35617            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
35618            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
35619            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
35620            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
35621            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
35622            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
35623            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
35624            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
35625            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
35626            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
35627            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
35628            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
35629            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
35630            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
35631            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
35632            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
35633            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
35634            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
35635            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
35636            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
35637            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
35638            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
35639            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
35640            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
35641            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
35642            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
35643            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
35644            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
35645            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
35646            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
35647            PING_DATA::NAME => Some(PING_DATA::ID),
35648            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
35649            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
35650            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
35651            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
35652            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
35653            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
35654            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
35655            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
35656            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
35657            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
35658            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
35659            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
35660            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
35661            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
35662            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
35663            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
35664            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
35665            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
35666            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
35667            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
35668            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
35669            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
35670            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
35671            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
35672            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
35673            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
35674            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
35675            SERIAL_UDB_EXTRA_F13_DATA::NAME => Some(SERIAL_UDB_EXTRA_F13_DATA::ID),
35676            SERIAL_UDB_EXTRA_F14_DATA::NAME => Some(SERIAL_UDB_EXTRA_F14_DATA::ID),
35677            SERIAL_UDB_EXTRA_F15_DATA::NAME => Some(SERIAL_UDB_EXTRA_F15_DATA::ID),
35678            SERIAL_UDB_EXTRA_F16_DATA::NAME => Some(SERIAL_UDB_EXTRA_F16_DATA::ID),
35679            SERIAL_UDB_EXTRA_F17_DATA::NAME => Some(SERIAL_UDB_EXTRA_F17_DATA::ID),
35680            SERIAL_UDB_EXTRA_F18_DATA::NAME => Some(SERIAL_UDB_EXTRA_F18_DATA::ID),
35681            SERIAL_UDB_EXTRA_F19_DATA::NAME => Some(SERIAL_UDB_EXTRA_F19_DATA::ID),
35682            SERIAL_UDB_EXTRA_F20_DATA::NAME => Some(SERIAL_UDB_EXTRA_F20_DATA::ID),
35683            SERIAL_UDB_EXTRA_F21_DATA::NAME => Some(SERIAL_UDB_EXTRA_F21_DATA::ID),
35684            SERIAL_UDB_EXTRA_F22_DATA::NAME => Some(SERIAL_UDB_EXTRA_F22_DATA::ID),
35685            SERIAL_UDB_EXTRA_F2_A_DATA::NAME => Some(SERIAL_UDB_EXTRA_F2_A_DATA::ID),
35686            SERIAL_UDB_EXTRA_F2_B_DATA::NAME => Some(SERIAL_UDB_EXTRA_F2_B_DATA::ID),
35687            SERIAL_UDB_EXTRA_F4_DATA::NAME => Some(SERIAL_UDB_EXTRA_F4_DATA::ID),
35688            SERIAL_UDB_EXTRA_F5_DATA::NAME => Some(SERIAL_UDB_EXTRA_F5_DATA::ID),
35689            SERIAL_UDB_EXTRA_F6_DATA::NAME => Some(SERIAL_UDB_EXTRA_F6_DATA::ID),
35690            SERIAL_UDB_EXTRA_F7_DATA::NAME => Some(SERIAL_UDB_EXTRA_F7_DATA::ID),
35691            SERIAL_UDB_EXTRA_F8_DATA::NAME => Some(SERIAL_UDB_EXTRA_F8_DATA::ID),
35692            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
35693            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
35694            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
35695            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
35696            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
35697            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
35698            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
35699            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
35700                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
35701            }
35702            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
35703                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
35704            }
35705            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
35706            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
35707            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
35708            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
35709            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
35710            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
35711            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
35712            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
35713            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
35714            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
35715            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
35716            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
35717            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
35718            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
35719                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
35720            }
35721            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
35722                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
35723            }
35724            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
35725            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
35726            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
35727            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
35728            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
35729            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
35730            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
35731            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
35732            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
35733            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
35734            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
35735            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
35736            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
35737            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
35738            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
35739            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
35740            _ => None,
35741        }
35742    }
35743    fn default_message_from_id(id: u32) -> Option<Self> {
35744        match id {
35745            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35746                ACTUATOR_CONTROL_TARGET_DATA::default(),
35747            )),
35748            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35749                ACTUATOR_OUTPUT_STATUS_DATA::default(),
35750            )),
35751            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
35752            AIRSPEEDS_DATA::ID => Some(Self::AIRSPEEDS(AIRSPEEDS_DATA::default())),
35753            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
35754            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
35755            ALTITUDES_DATA::ID => Some(Self::ALTITUDES(ALTITUDES_DATA::default())),
35756            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
35757            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35758                ATTITUDE_QUATERNION_DATA::default(),
35759            )),
35760            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35761                ATTITUDE_QUATERNION_COV_DATA::default(),
35762            )),
35763            ATTITUDE_TARGET_DATA::ID => {
35764                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
35765            }
35766            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
35767            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
35768            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35769                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35770                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
35771                ))
35772            }
35773            AUTOPILOT_VERSION_DATA::ID => {
35774                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
35775            }
35776            AVAILABLE_MODES_DATA::ID => {
35777                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
35778            }
35779            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35780                AVAILABLE_MODES_MONITOR_DATA::default(),
35781            )),
35782            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
35783            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
35784            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
35785            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35786                CAMERA_CAPTURE_STATUS_DATA::default(),
35787            )),
35788            CAMERA_FOV_STATUS_DATA::ID => {
35789                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
35790            }
35791            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35792                CAMERA_IMAGE_CAPTURED_DATA::default(),
35793            )),
35794            CAMERA_INFORMATION_DATA::ID => {
35795                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
35796            }
35797            CAMERA_SETTINGS_DATA::ID => {
35798                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
35799            }
35800            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35801                CAMERA_THERMAL_RANGE_DATA::default(),
35802            )),
35803            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35804                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
35805            )),
35806            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35807                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
35808            )),
35809            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
35810            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
35811            CAN_FILTER_MODIFY_DATA::ID => {
35812                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
35813            }
35814            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
35815            CELLULAR_CONFIG_DATA::ID => {
35816                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
35817            }
35818            CELLULAR_STATUS_DATA::ID => {
35819                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
35820            }
35821            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35822                CHANGE_OPERATOR_CONTROL_DATA::default(),
35823            )),
35824            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35825                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
35826            )),
35827            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
35828            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
35829            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
35830            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
35831            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
35832            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35833                COMPONENT_INFORMATION_DATA::default(),
35834            )),
35835            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35836                COMPONENT_INFORMATION_BASIC_DATA::default(),
35837            )),
35838            COMPONENT_METADATA_DATA::ID => {
35839                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
35840            }
35841            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35842                CONTROL_SYSTEM_STATE_DATA::default(),
35843            )),
35844            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35845                CURRENT_EVENT_SEQUENCE_DATA::default(),
35846            )),
35847            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
35848            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
35849            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35850                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
35851            )),
35852            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
35853            DEBUG_FLOAT_ARRAY_DATA::ID => {
35854                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
35855            }
35856            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
35857            DISTANCE_SENSOR_DATA::ID => {
35858                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
35859            }
35860            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
35861            ENCAPSULATED_DATA_DATA::ID => {
35862                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
35863            }
35864            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
35865            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
35866            ESTIMATOR_STATUS_DATA::ID => {
35867                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
35868            }
35869            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
35870            EXTENDED_SYS_STATE_DATA::ID => {
35871                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
35872            }
35873            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
35874            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35875                FILE_TRANSFER_PROTOCOL_DATA::default(),
35876            )),
35877            FLEXIFUNCTION_BUFFER_FUNCTION_DATA::ID => Some(Self::FLEXIFUNCTION_BUFFER_FUNCTION(
35878                FLEXIFUNCTION_BUFFER_FUNCTION_DATA::default(),
35879            )),
35880            FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::ID => {
35881                Some(Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(
35882                    FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::default(),
35883                ))
35884            }
35885            FLEXIFUNCTION_COMMAND_DATA::ID => Some(Self::FLEXIFUNCTION_COMMAND(
35886                FLEXIFUNCTION_COMMAND_DATA::default(),
35887            )),
35888            FLEXIFUNCTION_COMMAND_ACK_DATA::ID => Some(Self::FLEXIFUNCTION_COMMAND_ACK(
35889                FLEXIFUNCTION_COMMAND_ACK_DATA::default(),
35890            )),
35891            FLEXIFUNCTION_DIRECTORY_DATA::ID => Some(Self::FLEXIFUNCTION_DIRECTORY(
35892                FLEXIFUNCTION_DIRECTORY_DATA::default(),
35893            )),
35894            FLEXIFUNCTION_DIRECTORY_ACK_DATA::ID => Some(Self::FLEXIFUNCTION_DIRECTORY_ACK(
35895                FLEXIFUNCTION_DIRECTORY_ACK_DATA::default(),
35896            )),
35897            FLEXIFUNCTION_READ_REQ_DATA::ID => Some(Self::FLEXIFUNCTION_READ_REQ(
35898                FLEXIFUNCTION_READ_REQ_DATA::default(),
35899            )),
35900            FLEXIFUNCTION_SET_DATA::ID => {
35901                Some(Self::FLEXIFUNCTION_SET(FLEXIFUNCTION_SET_DATA::default()))
35902            }
35903            FLIGHT_INFORMATION_DATA::ID => {
35904                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
35905            }
35906            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
35907            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
35908            GENERATOR_STATUS_DATA::ID => {
35909                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
35910            }
35911            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35912                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
35913            )),
35914            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35915                GIMBAL_DEVICE_INFORMATION_DATA::default(),
35916            )),
35917            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35918                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35919            )),
35920            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35921                GIMBAL_MANAGER_INFORMATION_DATA::default(),
35922            )),
35923            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35924                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35925            )),
35926            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35927                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35928                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35929                ))
35930            }
35931            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35932                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
35933            )),
35934            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35935                GIMBAL_MANAGER_STATUS_DATA::default(),
35936            )),
35937            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35938                GLOBAL_POSITION_INT_DATA::default(),
35939            )),
35940            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35941                GLOBAL_POSITION_INT_COV_DATA::default(),
35942            )),
35943            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35944                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35945                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
35946                ))
35947            }
35948            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
35949            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
35950            GPS_GLOBAL_ORIGIN_DATA::ID => {
35951                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
35952            }
35953            GPS_INJECT_DATA_DATA::ID => {
35954                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
35955            }
35956            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
35957            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
35958            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
35959            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
35960            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
35961            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
35962            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
35963            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
35964            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
35965            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35966                HIL_ACTUATOR_CONTROLS_DATA::default(),
35967            )),
35968            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
35969            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
35970            HIL_OPTICAL_FLOW_DATA::ID => {
35971                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
35972            }
35973            HIL_RC_INPUTS_RAW_DATA::ID => {
35974                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
35975            }
35976            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
35977            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
35978            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35979                HIL_STATE_QUATERNION_DATA::default(),
35980            )),
35981            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
35982            HYGROMETER_SENSOR_DATA::ID => {
35983                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
35984            }
35985            ILLUMINATOR_STATUS_DATA::ID => {
35986                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
35987            }
35988            ISBD_LINK_STATUS_DATA::ID => {
35989                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
35990            }
35991            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
35992            LINK_NODE_STATUS_DATA::ID => {
35993                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
35994            }
35995            LOCAL_POSITION_NED_DATA::ID => {
35996                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
35997            }
35998            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35999                LOCAL_POSITION_NED_COV_DATA::default(),
36000            )),
36001            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36002                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36003                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
36004                ))
36005            }
36006            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
36007            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
36008            LOGGING_DATA_ACKED_DATA::ID => {
36009                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
36010            }
36011            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
36012            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
36013            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
36014            LOG_REQUEST_DATA_DATA::ID => {
36015                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
36016            }
36017            LOG_REQUEST_END_DATA::ID => {
36018                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
36019            }
36020            LOG_REQUEST_LIST_DATA::ID => {
36021                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
36022            }
36023            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
36024            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
36025            MANUAL_SETPOINT_DATA::ID => {
36026                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
36027            }
36028            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
36029            MESSAGE_INTERVAL_DATA::ID => {
36030                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
36031            }
36032            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
36033            MISSION_CLEAR_ALL_DATA::ID => {
36034                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
36035            }
36036            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
36037            MISSION_CURRENT_DATA::ID => {
36038                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
36039            }
36040            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
36041            MISSION_ITEM_INT_DATA::ID => {
36042                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
36043            }
36044            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
36045                MISSION_ITEM_REACHED_DATA::default(),
36046            )),
36047            MISSION_REQUEST_DATA::ID => {
36048                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
36049            }
36050            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
36051                MISSION_REQUEST_INT_DATA::default(),
36052            )),
36053            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
36054                MISSION_REQUEST_LIST_DATA::default(),
36055            )),
36056            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
36057                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
36058            )),
36059            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
36060                MISSION_SET_CURRENT_DATA::default(),
36061            )),
36062            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
36063                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
36064            )),
36065            MOUNT_ORIENTATION_DATA::ID => {
36066                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
36067            }
36068            NAMED_VALUE_FLOAT_DATA::ID => {
36069                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
36070            }
36071            NAMED_VALUE_INT_DATA::ID => {
36072                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
36073            }
36074            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
36075                NAV_CONTROLLER_OUTPUT_DATA::default(),
36076            )),
36077            OBSTACLE_DISTANCE_DATA::ID => {
36078                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
36079            }
36080            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
36081            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
36082                ONBOARD_COMPUTER_STATUS_DATA::default(),
36083            )),
36084            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
36085                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
36086            )),
36087            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
36088                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
36089            )),
36090            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
36091                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
36092            )),
36093            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
36094                OPEN_DRONE_ID_LOCATION_DATA::default(),
36095            )),
36096            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
36097                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
36098            )),
36099            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
36100                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
36101            )),
36102            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
36103                OPEN_DRONE_ID_SELF_ID_DATA::default(),
36104            )),
36105            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
36106                OPEN_DRONE_ID_SYSTEM_DATA::default(),
36107            )),
36108            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
36109                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
36110            )),
36111            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
36112            OPTICAL_FLOW_RAD_DATA::ID => {
36113                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
36114            }
36115            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
36116                ORBIT_EXECUTION_STATUS_DATA::default(),
36117            )),
36118            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
36119            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
36120                PARAM_EXT_REQUEST_LIST_DATA::default(),
36121            )),
36122            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
36123                PARAM_EXT_REQUEST_READ_DATA::default(),
36124            )),
36125            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
36126            PARAM_EXT_VALUE_DATA::ID => {
36127                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
36128            }
36129            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
36130            PARAM_REQUEST_LIST_DATA::ID => {
36131                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
36132            }
36133            PARAM_REQUEST_READ_DATA::ID => {
36134                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
36135            }
36136            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
36137            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
36138            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
36139            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
36140            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
36141            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
36142                POSITION_TARGET_GLOBAL_INT_DATA::default(),
36143            )),
36144            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
36145                POSITION_TARGET_LOCAL_NED_DATA::default(),
36146            )),
36147            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
36148            PROTOCOL_VERSION_DATA::ID => {
36149                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
36150            }
36151            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
36152            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
36153            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
36154            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
36155            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
36156            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
36157                RC_CHANNELS_OVERRIDE_DATA::default(),
36158            )),
36159            RC_CHANNELS_RAW_DATA::ID => {
36160                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
36161            }
36162            RC_CHANNELS_SCALED_DATA::ID => {
36163                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
36164            }
36165            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
36166                REQUEST_DATA_STREAM_DATA::default(),
36167            )),
36168            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
36169            RESOURCE_REQUEST_DATA::ID => {
36170                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
36171            }
36172            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
36173                RESPONSE_EVENT_ERROR_DATA::default(),
36174            )),
36175            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
36176                SAFETY_ALLOWED_AREA_DATA::default(),
36177            )),
36178            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
36179                SAFETY_SET_ALLOWED_AREA_DATA::default(),
36180            )),
36181            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
36182            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
36183            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
36184            SCALED_PRESSURE_DATA::ID => {
36185                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
36186            }
36187            SCALED_PRESSURE2_DATA::ID => {
36188                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
36189            }
36190            SCALED_PRESSURE3_DATA::ID => {
36191                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
36192            }
36193            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
36194            SERIAL_UDB_EXTRA_F13_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F13(
36195                SERIAL_UDB_EXTRA_F13_DATA::default(),
36196            )),
36197            SERIAL_UDB_EXTRA_F14_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F14(
36198                SERIAL_UDB_EXTRA_F14_DATA::default(),
36199            )),
36200            SERIAL_UDB_EXTRA_F15_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F15(
36201                SERIAL_UDB_EXTRA_F15_DATA::default(),
36202            )),
36203            SERIAL_UDB_EXTRA_F16_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F16(
36204                SERIAL_UDB_EXTRA_F16_DATA::default(),
36205            )),
36206            SERIAL_UDB_EXTRA_F17_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F17(
36207                SERIAL_UDB_EXTRA_F17_DATA::default(),
36208            )),
36209            SERIAL_UDB_EXTRA_F18_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F18(
36210                SERIAL_UDB_EXTRA_F18_DATA::default(),
36211            )),
36212            SERIAL_UDB_EXTRA_F19_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F19(
36213                SERIAL_UDB_EXTRA_F19_DATA::default(),
36214            )),
36215            SERIAL_UDB_EXTRA_F20_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F20(
36216                SERIAL_UDB_EXTRA_F20_DATA::default(),
36217            )),
36218            SERIAL_UDB_EXTRA_F21_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F21(
36219                SERIAL_UDB_EXTRA_F21_DATA::default(),
36220            )),
36221            SERIAL_UDB_EXTRA_F22_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F22(
36222                SERIAL_UDB_EXTRA_F22_DATA::default(),
36223            )),
36224            SERIAL_UDB_EXTRA_F2_A_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F2_A(
36225                SERIAL_UDB_EXTRA_F2_A_DATA::default(),
36226            )),
36227            SERIAL_UDB_EXTRA_F2_B_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F2_B(
36228                SERIAL_UDB_EXTRA_F2_B_DATA::default(),
36229            )),
36230            SERIAL_UDB_EXTRA_F4_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F4(
36231                SERIAL_UDB_EXTRA_F4_DATA::default(),
36232            )),
36233            SERIAL_UDB_EXTRA_F5_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F5(
36234                SERIAL_UDB_EXTRA_F5_DATA::default(),
36235            )),
36236            SERIAL_UDB_EXTRA_F6_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F6(
36237                SERIAL_UDB_EXTRA_F6_DATA::default(),
36238            )),
36239            SERIAL_UDB_EXTRA_F7_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F7(
36240                SERIAL_UDB_EXTRA_F7_DATA::default(),
36241            )),
36242            SERIAL_UDB_EXTRA_F8_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F8(
36243                SERIAL_UDB_EXTRA_F8_DATA::default(),
36244            )),
36245            SERVO_OUTPUT_RAW_DATA::ID => {
36246                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
36247            }
36248            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
36249            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
36250                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
36251            )),
36252            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
36253                SET_ATTITUDE_TARGET_DATA::default(),
36254            )),
36255            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
36256                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
36257            )),
36258            SET_HOME_POSITION_DATA::ID => {
36259                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
36260            }
36261            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
36262            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
36263                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
36264            )),
36265            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
36266                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
36267            )),
36268            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
36269            SMART_BATTERY_INFO_DATA::ID => {
36270                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
36271            }
36272            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
36273            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
36274                STORAGE_INFORMATION_DATA::default(),
36275            )),
36276            SUPPORTED_TUNES_DATA::ID => {
36277                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
36278            }
36279            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
36280            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
36281            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
36282            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
36283            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
36284            TERRAIN_REQUEST_DATA::ID => {
36285                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
36286            }
36287            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
36288            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
36289                TIME_ESTIMATE_TO_TARGET_DATA::default(),
36290            )),
36291            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36292                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
36293                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
36294                ))
36295            }
36296            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36297                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
36298                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
36299                ))
36300            }
36301            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
36302            UAVCAN_NODE_INFO_DATA::ID => {
36303                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
36304            }
36305            UAVCAN_NODE_STATUS_DATA::ID => {
36306                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
36307            }
36308            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
36309                UTM_GLOBAL_POSITION_DATA::default(),
36310            )),
36311            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
36312            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
36313            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
36314            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36315                VICON_POSITION_ESTIMATE_DATA::default(),
36316            )),
36317            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36318                VIDEO_STREAM_INFORMATION_DATA::default(),
36319            )),
36320            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36321                VIDEO_STREAM_STATUS_DATA::default(),
36322            )),
36323            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36324                VISION_POSITION_ESTIMATE_DATA::default(),
36325            )),
36326            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36327                VISION_SPEED_ESTIMATE_DATA::default(),
36328            )),
36329            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
36330            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
36331            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
36332            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
36333            _ => None,
36334        }
36335    }
36336    #[cfg(feature = "arbitrary")]
36337    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
36338        match id {
36339            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
36340                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
36341            )),
36342            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
36343                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
36344            )),
36345            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
36346            AIRSPEEDS_DATA::ID => Some(Self::AIRSPEEDS(AIRSPEEDS_DATA::random(rng))),
36347            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
36348            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
36349            ALTITUDES_DATA::ID => Some(Self::ALTITUDES(ALTITUDES_DATA::random(rng))),
36350            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
36351            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
36352                ATTITUDE_QUATERNION_DATA::random(rng),
36353            )),
36354            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
36355                ATTITUDE_QUATERNION_COV_DATA::random(rng),
36356            )),
36357            ATTITUDE_TARGET_DATA::ID => {
36358                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
36359            }
36360            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
36361            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
36362            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36363                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
36364                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
36365                ))
36366            }
36367            AUTOPILOT_VERSION_DATA::ID => {
36368                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
36369            }
36370            AVAILABLE_MODES_DATA::ID => {
36371                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
36372            }
36373            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
36374                AVAILABLE_MODES_MONITOR_DATA::random(rng),
36375            )),
36376            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
36377            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
36378            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
36379            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
36380                CAMERA_CAPTURE_STATUS_DATA::random(rng),
36381            )),
36382            CAMERA_FOV_STATUS_DATA::ID => {
36383                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
36384            }
36385            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
36386                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
36387            )),
36388            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
36389                CAMERA_INFORMATION_DATA::random(rng),
36390            )),
36391            CAMERA_SETTINGS_DATA::ID => {
36392                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
36393            }
36394            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
36395                CAMERA_THERMAL_RANGE_DATA::random(rng),
36396            )),
36397            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
36398                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
36399            )),
36400            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
36401                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
36402            )),
36403            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
36404            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
36405            CAN_FILTER_MODIFY_DATA::ID => {
36406                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
36407            }
36408            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
36409            CELLULAR_CONFIG_DATA::ID => {
36410                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
36411            }
36412            CELLULAR_STATUS_DATA::ID => {
36413                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
36414            }
36415            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
36416                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
36417            )),
36418            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
36419                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
36420            )),
36421            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
36422            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
36423            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
36424            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
36425            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
36426            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
36427                COMPONENT_INFORMATION_DATA::random(rng),
36428            )),
36429            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
36430                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
36431            )),
36432            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
36433                COMPONENT_METADATA_DATA::random(rng),
36434            )),
36435            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
36436                CONTROL_SYSTEM_STATE_DATA::random(rng),
36437            )),
36438            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
36439                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
36440            )),
36441            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
36442            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
36443            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
36444                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
36445            )),
36446            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
36447            DEBUG_FLOAT_ARRAY_DATA::ID => {
36448                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
36449            }
36450            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
36451            DISTANCE_SENSOR_DATA::ID => {
36452                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
36453            }
36454            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
36455            ENCAPSULATED_DATA_DATA::ID => {
36456                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
36457            }
36458            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
36459            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
36460            ESTIMATOR_STATUS_DATA::ID => {
36461                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
36462            }
36463            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
36464            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
36465                EXTENDED_SYS_STATE_DATA::random(rng),
36466            )),
36467            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
36468            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
36469                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
36470            )),
36471            FLEXIFUNCTION_BUFFER_FUNCTION_DATA::ID => Some(Self::FLEXIFUNCTION_BUFFER_FUNCTION(
36472                FLEXIFUNCTION_BUFFER_FUNCTION_DATA::random(rng),
36473            )),
36474            FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::ID => {
36475                Some(Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(
36476                    FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::random(rng),
36477                ))
36478            }
36479            FLEXIFUNCTION_COMMAND_DATA::ID => Some(Self::FLEXIFUNCTION_COMMAND(
36480                FLEXIFUNCTION_COMMAND_DATA::random(rng),
36481            )),
36482            FLEXIFUNCTION_COMMAND_ACK_DATA::ID => Some(Self::FLEXIFUNCTION_COMMAND_ACK(
36483                FLEXIFUNCTION_COMMAND_ACK_DATA::random(rng),
36484            )),
36485            FLEXIFUNCTION_DIRECTORY_DATA::ID => Some(Self::FLEXIFUNCTION_DIRECTORY(
36486                FLEXIFUNCTION_DIRECTORY_DATA::random(rng),
36487            )),
36488            FLEXIFUNCTION_DIRECTORY_ACK_DATA::ID => Some(Self::FLEXIFUNCTION_DIRECTORY_ACK(
36489                FLEXIFUNCTION_DIRECTORY_ACK_DATA::random(rng),
36490            )),
36491            FLEXIFUNCTION_READ_REQ_DATA::ID => Some(Self::FLEXIFUNCTION_READ_REQ(
36492                FLEXIFUNCTION_READ_REQ_DATA::random(rng),
36493            )),
36494            FLEXIFUNCTION_SET_DATA::ID => {
36495                Some(Self::FLEXIFUNCTION_SET(FLEXIFUNCTION_SET_DATA::random(rng)))
36496            }
36497            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
36498                FLIGHT_INFORMATION_DATA::random(rng),
36499            )),
36500            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
36501            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
36502            GENERATOR_STATUS_DATA::ID => {
36503                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
36504            }
36505            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
36506                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
36507            )),
36508            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
36509                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
36510            )),
36511            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
36512                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
36513            )),
36514            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
36515                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
36516            )),
36517            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
36518                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
36519            )),
36520            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36521                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36522                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
36523                ))
36524            }
36525            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36526                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
36527            )),
36528            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36529                GIMBAL_MANAGER_STATUS_DATA::random(rng),
36530            )),
36531            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36532                GLOBAL_POSITION_INT_DATA::random(rng),
36533            )),
36534            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36535                GLOBAL_POSITION_INT_COV_DATA::random(rng),
36536            )),
36537            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36538                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36539                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
36540                ))
36541            }
36542            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
36543            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
36544            GPS_GLOBAL_ORIGIN_DATA::ID => {
36545                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
36546            }
36547            GPS_INJECT_DATA_DATA::ID => {
36548                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
36549            }
36550            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
36551            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
36552            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
36553            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
36554            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
36555            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
36556            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
36557            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
36558            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
36559            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36560                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
36561            )),
36562            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
36563            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
36564            HIL_OPTICAL_FLOW_DATA::ID => {
36565                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
36566            }
36567            HIL_RC_INPUTS_RAW_DATA::ID => {
36568                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
36569            }
36570            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
36571            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
36572            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36573                HIL_STATE_QUATERNION_DATA::random(rng),
36574            )),
36575            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
36576            HYGROMETER_SENSOR_DATA::ID => {
36577                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
36578            }
36579            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
36580                ILLUMINATOR_STATUS_DATA::random(rng),
36581            )),
36582            ISBD_LINK_STATUS_DATA::ID => {
36583                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
36584            }
36585            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
36586            LINK_NODE_STATUS_DATA::ID => {
36587                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
36588            }
36589            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
36590                LOCAL_POSITION_NED_DATA::random(rng),
36591            )),
36592            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36593                LOCAL_POSITION_NED_COV_DATA::random(rng),
36594            )),
36595            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36596                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36597                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
36598                ))
36599            }
36600            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
36601            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
36602            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
36603                LOGGING_DATA_ACKED_DATA::random(rng),
36604            )),
36605            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
36606            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
36607            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
36608            LOG_REQUEST_DATA_DATA::ID => {
36609                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
36610            }
36611            LOG_REQUEST_END_DATA::ID => {
36612                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
36613            }
36614            LOG_REQUEST_LIST_DATA::ID => {
36615                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
36616            }
36617            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
36618            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
36619            MANUAL_SETPOINT_DATA::ID => {
36620                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
36621            }
36622            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
36623            MESSAGE_INTERVAL_DATA::ID => {
36624                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
36625            }
36626            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
36627            MISSION_CLEAR_ALL_DATA::ID => {
36628                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
36629            }
36630            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
36631            MISSION_CURRENT_DATA::ID => {
36632                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
36633            }
36634            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
36635            MISSION_ITEM_INT_DATA::ID => {
36636                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
36637            }
36638            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
36639                MISSION_ITEM_REACHED_DATA::random(rng),
36640            )),
36641            MISSION_REQUEST_DATA::ID => {
36642                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
36643            }
36644            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
36645                MISSION_REQUEST_INT_DATA::random(rng),
36646            )),
36647            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
36648                MISSION_REQUEST_LIST_DATA::random(rng),
36649            )),
36650            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
36651                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
36652            )),
36653            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
36654                MISSION_SET_CURRENT_DATA::random(rng),
36655            )),
36656            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
36657                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
36658            )),
36659            MOUNT_ORIENTATION_DATA::ID => {
36660                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
36661            }
36662            NAMED_VALUE_FLOAT_DATA::ID => {
36663                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
36664            }
36665            NAMED_VALUE_INT_DATA::ID => {
36666                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
36667            }
36668            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
36669                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
36670            )),
36671            OBSTACLE_DISTANCE_DATA::ID => {
36672                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
36673            }
36674            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
36675            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
36676                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
36677            )),
36678            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
36679                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
36680            )),
36681            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
36682                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
36683            )),
36684            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
36685                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
36686            )),
36687            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
36688                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
36689            )),
36690            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
36691                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
36692            )),
36693            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
36694                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
36695            )),
36696            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
36697                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
36698            )),
36699            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
36700                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
36701            )),
36702            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
36703                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
36704            )),
36705            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
36706            OPTICAL_FLOW_RAD_DATA::ID => {
36707                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
36708            }
36709            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
36710                ORBIT_EXECUTION_STATUS_DATA::random(rng),
36711            )),
36712            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
36713            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
36714                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
36715            )),
36716            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
36717                PARAM_EXT_REQUEST_READ_DATA::random(rng),
36718            )),
36719            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
36720            PARAM_EXT_VALUE_DATA::ID => {
36721                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
36722            }
36723            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
36724            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
36725                PARAM_REQUEST_LIST_DATA::random(rng),
36726            )),
36727            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
36728                PARAM_REQUEST_READ_DATA::random(rng),
36729            )),
36730            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
36731            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
36732            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
36733            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
36734            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
36735            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
36736                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
36737            )),
36738            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
36739                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
36740            )),
36741            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
36742            PROTOCOL_VERSION_DATA::ID => {
36743                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
36744            }
36745            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
36746            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
36747            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
36748            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
36749            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
36750            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
36751                RC_CHANNELS_OVERRIDE_DATA::random(rng),
36752            )),
36753            RC_CHANNELS_RAW_DATA::ID => {
36754                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
36755            }
36756            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
36757                RC_CHANNELS_SCALED_DATA::random(rng),
36758            )),
36759            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
36760                REQUEST_DATA_STREAM_DATA::random(rng),
36761            )),
36762            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
36763            RESOURCE_REQUEST_DATA::ID => {
36764                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
36765            }
36766            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
36767                RESPONSE_EVENT_ERROR_DATA::random(rng),
36768            )),
36769            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
36770                SAFETY_ALLOWED_AREA_DATA::random(rng),
36771            )),
36772            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
36773                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
36774            )),
36775            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
36776            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
36777            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
36778            SCALED_PRESSURE_DATA::ID => {
36779                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
36780            }
36781            SCALED_PRESSURE2_DATA::ID => {
36782                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
36783            }
36784            SCALED_PRESSURE3_DATA::ID => {
36785                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
36786            }
36787            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
36788            SERIAL_UDB_EXTRA_F13_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F13(
36789                SERIAL_UDB_EXTRA_F13_DATA::random(rng),
36790            )),
36791            SERIAL_UDB_EXTRA_F14_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F14(
36792                SERIAL_UDB_EXTRA_F14_DATA::random(rng),
36793            )),
36794            SERIAL_UDB_EXTRA_F15_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F15(
36795                SERIAL_UDB_EXTRA_F15_DATA::random(rng),
36796            )),
36797            SERIAL_UDB_EXTRA_F16_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F16(
36798                SERIAL_UDB_EXTRA_F16_DATA::random(rng),
36799            )),
36800            SERIAL_UDB_EXTRA_F17_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F17(
36801                SERIAL_UDB_EXTRA_F17_DATA::random(rng),
36802            )),
36803            SERIAL_UDB_EXTRA_F18_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F18(
36804                SERIAL_UDB_EXTRA_F18_DATA::random(rng),
36805            )),
36806            SERIAL_UDB_EXTRA_F19_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F19(
36807                SERIAL_UDB_EXTRA_F19_DATA::random(rng),
36808            )),
36809            SERIAL_UDB_EXTRA_F20_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F20(
36810                SERIAL_UDB_EXTRA_F20_DATA::random(rng),
36811            )),
36812            SERIAL_UDB_EXTRA_F21_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F21(
36813                SERIAL_UDB_EXTRA_F21_DATA::random(rng),
36814            )),
36815            SERIAL_UDB_EXTRA_F22_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F22(
36816                SERIAL_UDB_EXTRA_F22_DATA::random(rng),
36817            )),
36818            SERIAL_UDB_EXTRA_F2_A_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F2_A(
36819                SERIAL_UDB_EXTRA_F2_A_DATA::random(rng),
36820            )),
36821            SERIAL_UDB_EXTRA_F2_B_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F2_B(
36822                SERIAL_UDB_EXTRA_F2_B_DATA::random(rng),
36823            )),
36824            SERIAL_UDB_EXTRA_F4_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F4(
36825                SERIAL_UDB_EXTRA_F4_DATA::random(rng),
36826            )),
36827            SERIAL_UDB_EXTRA_F5_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F5(
36828                SERIAL_UDB_EXTRA_F5_DATA::random(rng),
36829            )),
36830            SERIAL_UDB_EXTRA_F6_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F6(
36831                SERIAL_UDB_EXTRA_F6_DATA::random(rng),
36832            )),
36833            SERIAL_UDB_EXTRA_F7_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F7(
36834                SERIAL_UDB_EXTRA_F7_DATA::random(rng),
36835            )),
36836            SERIAL_UDB_EXTRA_F8_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F8(
36837                SERIAL_UDB_EXTRA_F8_DATA::random(rng),
36838            )),
36839            SERVO_OUTPUT_RAW_DATA::ID => {
36840                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
36841            }
36842            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
36843            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
36844                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
36845            )),
36846            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
36847                SET_ATTITUDE_TARGET_DATA::random(rng),
36848            )),
36849            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
36850                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
36851            )),
36852            SET_HOME_POSITION_DATA::ID => {
36853                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
36854            }
36855            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
36856            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
36857                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
36858            )),
36859            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
36860                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
36861            )),
36862            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
36863            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
36864                SMART_BATTERY_INFO_DATA::random(rng),
36865            )),
36866            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
36867            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
36868                STORAGE_INFORMATION_DATA::random(rng),
36869            )),
36870            SUPPORTED_TUNES_DATA::ID => {
36871                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
36872            }
36873            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
36874            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
36875            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
36876            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
36877            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
36878            TERRAIN_REQUEST_DATA::ID => {
36879                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
36880            }
36881            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
36882            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
36883                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
36884            )),
36885            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36886                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
36887                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
36888                ))
36889            }
36890            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36891                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
36892                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
36893                ))
36894            }
36895            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
36896            UAVCAN_NODE_INFO_DATA::ID => {
36897                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
36898            }
36899            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
36900                UAVCAN_NODE_STATUS_DATA::random(rng),
36901            )),
36902            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
36903                UTM_GLOBAL_POSITION_DATA::random(rng),
36904            )),
36905            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
36906            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
36907            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
36908            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36909                VICON_POSITION_ESTIMATE_DATA::random(rng),
36910            )),
36911            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36912                VIDEO_STREAM_INFORMATION_DATA::random(rng),
36913            )),
36914            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36915                VIDEO_STREAM_STATUS_DATA::random(rng),
36916            )),
36917            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36918                VISION_POSITION_ESTIMATE_DATA::random(rng),
36919            )),
36920            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36921                VISION_SPEED_ESTIMATE_DATA::random(rng),
36922            )),
36923            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
36924            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
36925            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
36926            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
36927            _ => None,
36928        }
36929    }
36930    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36931        match self {
36932            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36933            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
36934            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
36935            Self::AIRSPEEDS(body) => body.ser(version, bytes),
36936            Self::AIS_VESSEL(body) => body.ser(version, bytes),
36937            Self::ALTITUDE(body) => body.ser(version, bytes),
36938            Self::ALTITUDES(body) => body.ser(version, bytes),
36939            Self::ATTITUDE(body) => body.ser(version, bytes),
36940            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
36941            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
36942            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
36943            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
36944            Self::AUTH_KEY(body) => body.ser(version, bytes),
36945            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
36946            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
36947            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
36948            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
36949            Self::BATTERY_INFO(body) => body.ser(version, bytes),
36950            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
36951            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
36952            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
36953            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
36954            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
36955            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
36956            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
36957            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
36958            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
36959            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
36960            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
36961            Self::CANFD_FRAME(body) => body.ser(version, bytes),
36962            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
36963            Self::CAN_FRAME(body) => body.ser(version, bytes),
36964            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
36965            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
36966            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
36967            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
36968            Self::COLLISION(body) => body.ser(version, bytes),
36969            Self::COMMAND_ACK(body) => body.ser(version, bytes),
36970            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
36971            Self::COMMAND_INT(body) => body.ser(version, bytes),
36972            Self::COMMAND_LONG(body) => body.ser(version, bytes),
36973            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
36974            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
36975            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
36976            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
36977            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
36978            Self::CURRENT_MODE(body) => body.ser(version, bytes),
36979            Self::DATA_STREAM(body) => body.ser(version, bytes),
36980            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
36981            Self::DEBUG(body) => body.ser(version, bytes),
36982            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
36983            Self::DEBUG_VECT(body) => body.ser(version, bytes),
36984            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
36985            Self::EFI_STATUS(body) => body.ser(version, bytes),
36986            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
36987            Self::ESC_INFO(body) => body.ser(version, bytes),
36988            Self::ESC_STATUS(body) => body.ser(version, bytes),
36989            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
36990            Self::EVENT(body) => body.ser(version, bytes),
36991            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
36992            Self::FENCE_STATUS(body) => body.ser(version, bytes),
36993            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
36994            Self::FLEXIFUNCTION_BUFFER_FUNCTION(body) => body.ser(version, bytes),
36995            Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(body) => body.ser(version, bytes),
36996            Self::FLEXIFUNCTION_COMMAND(body) => body.ser(version, bytes),
36997            Self::FLEXIFUNCTION_COMMAND_ACK(body) => body.ser(version, bytes),
36998            Self::FLEXIFUNCTION_DIRECTORY(body) => body.ser(version, bytes),
36999            Self::FLEXIFUNCTION_DIRECTORY_ACK(body) => body.ser(version, bytes),
37000            Self::FLEXIFUNCTION_READ_REQ(body) => body.ser(version, bytes),
37001            Self::FLEXIFUNCTION_SET(body) => body.ser(version, bytes),
37002            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
37003            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
37004            Self::FUEL_STATUS(body) => body.ser(version, bytes),
37005            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
37006            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
37007            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
37008            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
37009            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
37010            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
37011            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
37012            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
37013            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
37014            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
37015            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
37016            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37017            Self::GPS2_RAW(body) => body.ser(version, bytes),
37018            Self::GPS2_RTK(body) => body.ser(version, bytes),
37019            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
37020            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
37021            Self::GPS_INPUT(body) => body.ser(version, bytes),
37022            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
37023            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
37024            Self::GPS_RTK(body) => body.ser(version, bytes),
37025            Self::GPS_STATUS(body) => body.ser(version, bytes),
37026            Self::HEARTBEAT(body) => body.ser(version, bytes),
37027            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
37028            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
37029            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
37030            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
37031            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
37032            Self::HIL_GPS(body) => body.ser(version, bytes),
37033            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
37034            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
37035            Self::HIL_SENSOR(body) => body.ser(version, bytes),
37036            Self::HIL_STATE(body) => body.ser(version, bytes),
37037            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
37038            Self::HOME_POSITION(body) => body.ser(version, bytes),
37039            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
37040            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
37041            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
37042            Self::LANDING_TARGET(body) => body.ser(version, bytes),
37043            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
37044            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
37045            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
37046            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
37047            Self::LOGGING_ACK(body) => body.ser(version, bytes),
37048            Self::LOGGING_DATA(body) => body.ser(version, bytes),
37049            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
37050            Self::LOG_DATA(body) => body.ser(version, bytes),
37051            Self::LOG_ENTRY(body) => body.ser(version, bytes),
37052            Self::LOG_ERASE(body) => body.ser(version, bytes),
37053            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
37054            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
37055            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
37056            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
37057            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
37058            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
37059            Self::MEMORY_VECT(body) => body.ser(version, bytes),
37060            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
37061            Self::MISSION_ACK(body) => body.ser(version, bytes),
37062            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
37063            Self::MISSION_COUNT(body) => body.ser(version, bytes),
37064            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
37065            Self::MISSION_ITEM(body) => body.ser(version, bytes),
37066            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
37067            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
37068            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
37069            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
37070            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
37071            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
37072            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
37073            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
37074            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
37075            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
37076            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
37077            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
37078            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
37079            Self::ODOMETRY(body) => body.ser(version, bytes),
37080            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
37081            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
37082            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
37083            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
37084            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
37085            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
37086            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
37087            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
37088            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
37089            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
37090            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
37091            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
37092            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
37093            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
37094            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
37095            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
37096            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
37097            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
37098            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
37099            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
37100            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
37101            Self::PARAM_SET(body) => body.ser(version, bytes),
37102            Self::PARAM_VALUE(body) => body.ser(version, bytes),
37103            Self::PING(body) => body.ser(version, bytes),
37104            Self::PLAY_TUNE(body) => body.ser(version, bytes),
37105            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
37106            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
37107            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
37108            Self::POWER_STATUS(body) => body.ser(version, bytes),
37109            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
37110            Self::RADIO_STATUS(body) => body.ser(version, bytes),
37111            Self::RAW_IMU(body) => body.ser(version, bytes),
37112            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
37113            Self::RAW_RPM(body) => body.ser(version, bytes),
37114            Self::RC_CHANNELS(body) => body.ser(version, bytes),
37115            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
37116            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
37117            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
37118            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
37119            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
37120            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
37121            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
37122            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
37123            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
37124            Self::SCALED_IMU(body) => body.ser(version, bytes),
37125            Self::SCALED_IMU2(body) => body.ser(version, bytes),
37126            Self::SCALED_IMU3(body) => body.ser(version, bytes),
37127            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
37128            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
37129            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
37130            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
37131            Self::SERIAL_UDB_EXTRA_F13(body) => body.ser(version, bytes),
37132            Self::SERIAL_UDB_EXTRA_F14(body) => body.ser(version, bytes),
37133            Self::SERIAL_UDB_EXTRA_F15(body) => body.ser(version, bytes),
37134            Self::SERIAL_UDB_EXTRA_F16(body) => body.ser(version, bytes),
37135            Self::SERIAL_UDB_EXTRA_F17(body) => body.ser(version, bytes),
37136            Self::SERIAL_UDB_EXTRA_F18(body) => body.ser(version, bytes),
37137            Self::SERIAL_UDB_EXTRA_F19(body) => body.ser(version, bytes),
37138            Self::SERIAL_UDB_EXTRA_F20(body) => body.ser(version, bytes),
37139            Self::SERIAL_UDB_EXTRA_F21(body) => body.ser(version, bytes),
37140            Self::SERIAL_UDB_EXTRA_F22(body) => body.ser(version, bytes),
37141            Self::SERIAL_UDB_EXTRA_F2_A(body) => body.ser(version, bytes),
37142            Self::SERIAL_UDB_EXTRA_F2_B(body) => body.ser(version, bytes),
37143            Self::SERIAL_UDB_EXTRA_F4(body) => body.ser(version, bytes),
37144            Self::SERIAL_UDB_EXTRA_F5(body) => body.ser(version, bytes),
37145            Self::SERIAL_UDB_EXTRA_F6(body) => body.ser(version, bytes),
37146            Self::SERIAL_UDB_EXTRA_F7(body) => body.ser(version, bytes),
37147            Self::SERIAL_UDB_EXTRA_F8(body) => body.ser(version, bytes),
37148            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
37149            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
37150            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
37151            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
37152            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
37153            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
37154            Self::SET_MODE(body) => body.ser(version, bytes),
37155            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
37156            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
37157            Self::SIM_STATE(body) => body.ser(version, bytes),
37158            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
37159            Self::STATUSTEXT(body) => body.ser(version, bytes),
37160            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
37161            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
37162            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
37163            Self::SYS_STATUS(body) => body.ser(version, bytes),
37164            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
37165            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
37166            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
37167            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
37168            Self::TIMESYNC(body) => body.ser(version, bytes),
37169            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
37170            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
37171            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
37172            Self::TUNNEL(body) => body.ser(version, bytes),
37173            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
37174            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
37175            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
37176            Self::V2_EXTENSION(body) => body.ser(version, bytes),
37177            Self::VFR_HUD(body) => body.ser(version, bytes),
37178            Self::VIBRATION(body) => body.ser(version, bytes),
37179            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37180            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
37181            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
37182            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37183            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
37184            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
37185            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
37186            Self::WINCH_STATUS(body) => body.ser(version, bytes),
37187            Self::WIND_COV(body) => body.ser(version, bytes),
37188        }
37189    }
37190    fn extra_crc(id: u32) -> u8 {
37191        match id {
37192            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
37193            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
37194            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
37195            AIRSPEEDS_DATA::ID => AIRSPEEDS_DATA::EXTRA_CRC,
37196            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
37197            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
37198            ALTITUDES_DATA::ID => ALTITUDES_DATA::EXTRA_CRC,
37199            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
37200            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
37201            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
37202            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
37203            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
37204            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
37205            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
37206                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
37207            }
37208            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
37209            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
37210            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
37211            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
37212            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
37213            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
37214            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
37215            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
37216            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
37217            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
37218            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
37219            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
37220            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
37221            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
37222            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
37223            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
37224            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
37225            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
37226            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
37227            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
37228            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
37229            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
37230            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
37231            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
37232            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
37233            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
37234            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
37235            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
37236            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
37237            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
37238            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
37239            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
37240            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
37241            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
37242            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
37243            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
37244            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
37245            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
37246            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
37247            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
37248            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
37249            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
37250            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
37251            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
37252            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
37253            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
37254            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
37255            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
37256            FLEXIFUNCTION_BUFFER_FUNCTION_DATA::ID => FLEXIFUNCTION_BUFFER_FUNCTION_DATA::EXTRA_CRC,
37257            FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::ID => {
37258                FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::EXTRA_CRC
37259            }
37260            FLEXIFUNCTION_COMMAND_DATA::ID => FLEXIFUNCTION_COMMAND_DATA::EXTRA_CRC,
37261            FLEXIFUNCTION_COMMAND_ACK_DATA::ID => FLEXIFUNCTION_COMMAND_ACK_DATA::EXTRA_CRC,
37262            FLEXIFUNCTION_DIRECTORY_DATA::ID => FLEXIFUNCTION_DIRECTORY_DATA::EXTRA_CRC,
37263            FLEXIFUNCTION_DIRECTORY_ACK_DATA::ID => FLEXIFUNCTION_DIRECTORY_ACK_DATA::EXTRA_CRC,
37264            FLEXIFUNCTION_READ_REQ_DATA::ID => FLEXIFUNCTION_READ_REQ_DATA::EXTRA_CRC,
37265            FLEXIFUNCTION_SET_DATA::ID => FLEXIFUNCTION_SET_DATA::EXTRA_CRC,
37266            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
37267            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
37268            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
37269            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
37270            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
37271            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
37272            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
37273            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
37274            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
37275            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37276                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
37277            }
37278            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
37279            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
37280            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
37281            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
37282            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37283                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
37284            }
37285            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
37286            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
37287            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
37288            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
37289            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
37290            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
37291            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
37292            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
37293            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
37294            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
37295            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
37296            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
37297            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
37298            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
37299            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
37300            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
37301            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
37302            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
37303            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
37304            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
37305            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
37306            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
37307            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
37308            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
37309            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
37310            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
37311            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
37312            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
37313            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
37314            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37315                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
37316            }
37317            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
37318            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
37319            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
37320            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
37321            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
37322            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
37323            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
37324            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
37325            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
37326            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
37327            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
37328            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
37329            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
37330            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
37331            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
37332            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
37333            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
37334            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
37335            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
37336            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
37337            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
37338            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
37339            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
37340            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
37341            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
37342            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
37343            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
37344            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
37345            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
37346            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
37347            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
37348            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
37349            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
37350            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
37351            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
37352            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
37353            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
37354            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
37355            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
37356            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
37357            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
37358            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
37359            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
37360            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
37361            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
37362            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
37363            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
37364            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
37365            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
37366            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
37367            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
37368            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
37369            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
37370            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
37371            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
37372            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
37373            PING_DATA::ID => PING_DATA::EXTRA_CRC,
37374            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
37375            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
37376            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
37377            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
37378            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
37379            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
37380            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
37381            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
37382            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
37383            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
37384            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
37385            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
37386            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
37387            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
37388            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
37389            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
37390            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
37391            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
37392            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
37393            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
37394            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
37395            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
37396            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
37397            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
37398            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
37399            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
37400            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
37401            SERIAL_UDB_EXTRA_F13_DATA::ID => SERIAL_UDB_EXTRA_F13_DATA::EXTRA_CRC,
37402            SERIAL_UDB_EXTRA_F14_DATA::ID => SERIAL_UDB_EXTRA_F14_DATA::EXTRA_CRC,
37403            SERIAL_UDB_EXTRA_F15_DATA::ID => SERIAL_UDB_EXTRA_F15_DATA::EXTRA_CRC,
37404            SERIAL_UDB_EXTRA_F16_DATA::ID => SERIAL_UDB_EXTRA_F16_DATA::EXTRA_CRC,
37405            SERIAL_UDB_EXTRA_F17_DATA::ID => SERIAL_UDB_EXTRA_F17_DATA::EXTRA_CRC,
37406            SERIAL_UDB_EXTRA_F18_DATA::ID => SERIAL_UDB_EXTRA_F18_DATA::EXTRA_CRC,
37407            SERIAL_UDB_EXTRA_F19_DATA::ID => SERIAL_UDB_EXTRA_F19_DATA::EXTRA_CRC,
37408            SERIAL_UDB_EXTRA_F20_DATA::ID => SERIAL_UDB_EXTRA_F20_DATA::EXTRA_CRC,
37409            SERIAL_UDB_EXTRA_F21_DATA::ID => SERIAL_UDB_EXTRA_F21_DATA::EXTRA_CRC,
37410            SERIAL_UDB_EXTRA_F22_DATA::ID => SERIAL_UDB_EXTRA_F22_DATA::EXTRA_CRC,
37411            SERIAL_UDB_EXTRA_F2_A_DATA::ID => SERIAL_UDB_EXTRA_F2_A_DATA::EXTRA_CRC,
37412            SERIAL_UDB_EXTRA_F2_B_DATA::ID => SERIAL_UDB_EXTRA_F2_B_DATA::EXTRA_CRC,
37413            SERIAL_UDB_EXTRA_F4_DATA::ID => SERIAL_UDB_EXTRA_F4_DATA::EXTRA_CRC,
37414            SERIAL_UDB_EXTRA_F5_DATA::ID => SERIAL_UDB_EXTRA_F5_DATA::EXTRA_CRC,
37415            SERIAL_UDB_EXTRA_F6_DATA::ID => SERIAL_UDB_EXTRA_F6_DATA::EXTRA_CRC,
37416            SERIAL_UDB_EXTRA_F7_DATA::ID => SERIAL_UDB_EXTRA_F7_DATA::EXTRA_CRC,
37417            SERIAL_UDB_EXTRA_F8_DATA::ID => SERIAL_UDB_EXTRA_F8_DATA::EXTRA_CRC,
37418            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
37419            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
37420            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
37421            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
37422            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
37423            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
37424            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
37425            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
37426                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
37427            }
37428            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
37429            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
37430            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
37431            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
37432            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
37433            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
37434            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
37435            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
37436            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
37437            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
37438            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
37439            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
37440            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
37441            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
37442            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37443                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
37444            }
37445            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37446                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
37447            }
37448            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
37449            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
37450            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
37451            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
37452            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
37453            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
37454            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
37455            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
37456            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
37457            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
37458            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
37459            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
37460            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
37461            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
37462            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
37463            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
37464            _ => 0,
37465        }
37466    }
37467    fn target_system_id(&self) -> Option<u8> {
37468        match self {
37469            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
37470            Self::CANFD_FRAME(inner) => Some(inner.target_system),
37471            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
37472            Self::CAN_FRAME(inner) => Some(inner.target_system),
37473            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
37474            Self::COMMAND_ACK(inner) => Some(inner.target_system),
37475            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
37476            Self::COMMAND_INT(inner) => Some(inner.target_system),
37477            Self::COMMAND_LONG(inner) => Some(inner.target_system),
37478            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
37479            Self::FLEXIFUNCTION_BUFFER_FUNCTION(inner) => Some(inner.target_system),
37480            Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(inner) => Some(inner.target_system),
37481            Self::FLEXIFUNCTION_COMMAND(inner) => Some(inner.target_system),
37482            Self::FLEXIFUNCTION_DIRECTORY(inner) => Some(inner.target_system),
37483            Self::FLEXIFUNCTION_DIRECTORY_ACK(inner) => Some(inner.target_system),
37484            Self::FLEXIFUNCTION_READ_REQ(inner) => Some(inner.target_system),
37485            Self::FLEXIFUNCTION_SET(inner) => Some(inner.target_system),
37486            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
37487            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
37488            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
37489            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
37490            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
37491            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
37492            Self::LOGGING_ACK(inner) => Some(inner.target_system),
37493            Self::LOGGING_DATA(inner) => Some(inner.target_system),
37494            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
37495            Self::LOG_ERASE(inner) => Some(inner.target_system),
37496            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
37497            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
37498            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
37499            Self::MISSION_ACK(inner) => Some(inner.target_system),
37500            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
37501            Self::MISSION_COUNT(inner) => Some(inner.target_system),
37502            Self::MISSION_ITEM(inner) => Some(inner.target_system),
37503            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
37504            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
37505            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
37506            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
37507            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
37508            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
37509            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
37510            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
37511            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
37512            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
37513            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
37514            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
37515            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
37516            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
37517            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
37518            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
37519            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
37520            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
37521            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
37522            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
37523            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
37524            Self::PARAM_SET(inner) => Some(inner.target_system),
37525            Self::PING(inner) => Some(inner.target_system),
37526            Self::PLAY_TUNE(inner) => Some(inner.target_system),
37527            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
37528            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
37529            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
37530            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
37531            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
37532            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
37533            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
37534            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
37535            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
37536            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
37537            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
37538            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
37539            Self::SET_MODE(inner) => Some(inner.target_system),
37540            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
37541            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
37542            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
37543            Self::TIMESYNC(inner) => Some(inner.target_system),
37544            Self::TUNNEL(inner) => Some(inner.target_system),
37545            Self::V2_EXTENSION(inner) => Some(inner.target_system),
37546            _ => None,
37547        }
37548    }
37549    fn target_component_id(&self) -> Option<u8> {
37550        match self {
37551            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
37552            Self::CANFD_FRAME(inner) => Some(inner.target_component),
37553            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
37554            Self::CAN_FRAME(inner) => Some(inner.target_component),
37555            Self::COMMAND_ACK(inner) => Some(inner.target_component),
37556            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
37557            Self::COMMAND_INT(inner) => Some(inner.target_component),
37558            Self::COMMAND_LONG(inner) => Some(inner.target_component),
37559            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
37560            Self::FLEXIFUNCTION_BUFFER_FUNCTION(inner) => Some(inner.target_component),
37561            Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(inner) => Some(inner.target_component),
37562            Self::FLEXIFUNCTION_COMMAND(inner) => Some(inner.target_component),
37563            Self::FLEXIFUNCTION_DIRECTORY(inner) => Some(inner.target_component),
37564            Self::FLEXIFUNCTION_DIRECTORY_ACK(inner) => Some(inner.target_component),
37565            Self::FLEXIFUNCTION_READ_REQ(inner) => Some(inner.target_component),
37566            Self::FLEXIFUNCTION_SET(inner) => Some(inner.target_component),
37567            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
37568            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
37569            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
37570            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
37571            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
37572            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
37573            Self::LOGGING_ACK(inner) => Some(inner.target_component),
37574            Self::LOGGING_DATA(inner) => Some(inner.target_component),
37575            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
37576            Self::LOG_ERASE(inner) => Some(inner.target_component),
37577            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
37578            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
37579            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
37580            Self::MISSION_ACK(inner) => Some(inner.target_component),
37581            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
37582            Self::MISSION_COUNT(inner) => Some(inner.target_component),
37583            Self::MISSION_ITEM(inner) => Some(inner.target_component),
37584            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
37585            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
37586            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
37587            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
37588            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
37589            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
37590            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
37591            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
37592            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
37593            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
37594            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
37595            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
37596            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
37597            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
37598            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
37599            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
37600            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
37601            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
37602            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
37603            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
37604            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
37605            Self::PARAM_SET(inner) => Some(inner.target_component),
37606            Self::PING(inner) => Some(inner.target_component),
37607            Self::PLAY_TUNE(inner) => Some(inner.target_component),
37608            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
37609            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
37610            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
37611            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
37612            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
37613            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
37614            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
37615            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
37616            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
37617            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
37618            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
37619            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
37620            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
37621            Self::TIMESYNC(inner) => Some(inner.target_component),
37622            Self::TUNNEL(inner) => Some(inner.target_component),
37623            Self::V2_EXTENSION(inner) => Some(inner.target_component),
37624            _ => None,
37625        }
37626    }
37627}